Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
a7434da
Remove restrictions on compare-exchange memory ordering.
m-ou-se Jun 22, 2022
a898f41
Only enable new cmpxchg memory orderings in cfg(not(bootstrap)).
m-ou-se Jun 22, 2022
b631983
Use LocalDefId in OpaqueTypeKey
compiler-errors Jul 16, 2022
04c590b
Be more precise when suggesting removal of parens on unit adt ctor
compiler-errors Jul 16, 2022
23cb89e
Do not constraint TAITs when checking impl/trait item compatibility
compiler-errors Jul 17, 2022
26ecd44
Do not ICE when we have -Zunpretty=expand with invalid ABI
compiler-errors Jul 17, 2022
7a45a60
use rustc_hir_pretty::qpath_to_string to avoid span_to_snippet when r…
compiler-errors Jul 17, 2022
3024d39
Fix auto-expand of trees in source code page sidebar
GuillaumeGomez Jul 17, 2022
8c58de5
Fix for `rchunks_exact` doc
TethysSvensson Jul 17, 2022
98bceb0
Add GUI test for source code sidebar auto-expand
GuillaumeGomez Jul 17, 2022
4a3d780
Rollup merge of #98383 - m-ou-se:remove-memory-order-restrictions, r=…
JohnTitor Jul 17, 2022
b186284
Rollup merge of #99347 - compiler-errors:opaque-type-key-local-def-id…
JohnTitor Jul 17, 2022
8f6b494
Rollup merge of #99350 - compiler-errors:issue-99240, r=fee1-dead
JohnTitor Jul 17, 2022
c731b40
Rollup merge of #99356 - compiler-errors:tait-in-assoc-ty-supertraits…
JohnTitor Jul 17, 2022
af53fea
Rollup merge of #99360 - compiler-errors:issue-99331, r=fee1-dead
JohnTitor Jul 17, 2022
c3226d0
Rollup merge of #99373 - GuillaumeGomez:source-code-sidebar-tree-auto…
JohnTitor Jul 17, 2022
5e4b6fa
Rollup merge of #99374 - TethysSvensson:patch-1, r=Dylan-DPC
JohnTitor Jul 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Do not ICE when we have -Zunpretty=expand with invalid ABI
  • Loading branch information
compiler-errors committed Jul 17, 2022
commit 26ecd44160f54395b3bd5558cc5352f49cb0a0ba
10 changes: 6 additions & 4 deletions compiler/rustc_ast_passes/src/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,12 @@ impl<'a> PostExpansionVisitor<'a> {
);
}
abi => {
self.sess.parse_sess.span_diagnostic.delay_span_bug(
span,
&format!("unrecognized ABI not caught in lowering: {}", abi),
);
if self.sess.opts.pretty.map_or(true, |ppm| ppm.needs_hir()) {
self.sess.parse_sess.span_diagnostic.delay_span_bug(
span,
&format!("unrecognized ABI not caught in lowering: {}", abi),
);
}
}
}
}
Expand Down
8 changes: 8 additions & 0 deletions compiler/rustc_session/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2707,6 +2707,14 @@ impl PpMode {
| MirCFG => true,
}
}
pub fn needs_hir(&self) -> bool {
use PpMode::*;
match *self {
Source(_) | AstTree(_) => false,

Hir(_) | HirTree | ThirTree | Mir | MirCFG => true,
}
}

pub fn needs_analysis(&self) -> bool {
use PpMode::*;
Expand Down
13 changes: 13 additions & 0 deletions src/test/ui/codemap_tests/unicode.expanded.stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#![feature(prelude_import)]
#![no_std]
#[prelude_import]
use ::std::prelude::rust_2015::*;
#[macro_use]
extern crate std;
// revisions: normal expanded
//[expanded] check-pass
//[expanded]compile-flags: -Zunpretty=expanded

extern "路濫狼á́́" fn foo() {}

fn main() {}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0703]: invalid ABI: found `路濫狼á́́`
--> $DIR/unicode.rs:1:8
--> $DIR/unicode.rs:5:8
|
LL | extern "路濫狼á́́" fn foo() {}
| ^^^^^^^^^ invalid ABI
Expand Down
6 changes: 5 additions & 1 deletion src/test/ui/codemap_tests/unicode.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
extern "路濫狼á́́" fn foo() {} //~ ERROR invalid ABI
// revisions: normal expanded
//[expanded] check-pass
//[expanded]compile-flags: -Zunpretty=expanded

extern "路濫狼á́́" fn foo() {} //[normal]~ ERROR invalid ABI

fn main() { }