-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #97860 - Dylan-DPC:rollup-t3vxos8, r=Dylan-DPC
Rollup of 5 pull requests Successful merges: - #97595 (Remove unwrap from get_vtable) - #97597 (Preserve unused pointer to address casts) - #97819 (Recover `import` instead of `use` in item) - #97823 (Recover missing comma after match arm) - #97851 (Use repr(C) when depending on struct layout in ptr tests) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
20 changed files
with
335 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/test/mir-opt/simplify_locals.expose_addr.SimplifyLocals.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
- // MIR for `expose_addr` before SimplifyLocals | ||
+ // MIR for `expose_addr` after SimplifyLocals | ||
|
||
fn expose_addr(_1: *const usize) -> () { | ||
debug p => _1; // in scope 0 at $DIR/simplify-locals.rs:66:16: 66:17 | ||
let mut _0: (); // return place in scope 0 at $DIR/simplify-locals.rs:66:33: 66:33 | ||
let _2: usize; // in scope 0 at $DIR/simplify-locals.rs:68:5: 68:15 | ||
let mut _3: *const usize; // in scope 0 at $DIR/simplify-locals.rs:68:5: 68:6 | ||
|
||
bb0: { | ||
StorageLive(_2); // scope 0 at $DIR/simplify-locals.rs:68:5: 68:15 | ||
StorageLive(_3); // scope 0 at $DIR/simplify-locals.rs:68:5: 68:6 | ||
_3 = _1; // scope 0 at $DIR/simplify-locals.rs:68:5: 68:6 | ||
_2 = move _3 as usize (PointerExposeAddress); // scope 0 at $DIR/simplify-locals.rs:68:5: 68:15 | ||
StorageDead(_3); // scope 0 at $DIR/simplify-locals.rs:68:14: 68:15 | ||
StorageDead(_2); // scope 0 at $DIR/simplify-locals.rs:68:15: 68:16 | ||
_0 = const (); // scope 0 at $DIR/simplify-locals.rs:66:33: 69:2 | ||
return; // scope 0 at $DIR/simplify-locals.rs:69:2: 69:2 | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// run-rustfix | ||
|
||
use std::{ | ||
//~^ ERROR expected item, found `import` | ||
io::Write, | ||
rc::Rc, | ||
}; | ||
|
||
pub use std::io; | ||
//~^ ERROR expected item, found `using` | ||
|
||
fn main() { | ||
let x = Rc::new(1); | ||
let _ = write!(io::stdout(), "{:?}", x); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// run-rustfix | ||
|
||
import std::{ | ||
//~^ ERROR expected item, found `import` | ||
io::Write, | ||
rc::Rc, | ||
}; | ||
|
||
pub using std::io; | ||
//~^ ERROR expected item, found `using` | ||
|
||
fn main() { | ||
let x = Rc::new(1); | ||
let _ = write!(io::stdout(), "{:?}", x); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error: expected item, found `import` | ||
--> $DIR/use_instead_of_import.rs:3:1 | ||
| | ||
LL | import std::{ | ||
| ^^^^^^ help: items are imported using the `use` keyword | ||
|
||
error: expected item, found `using` | ||
--> $DIR/use_instead_of_import.rs:9:5 | ||
| | ||
LL | pub using std::io; | ||
| ^^^^^ help: items are imported using the `use` keyword | ||
|
||
error: aborting due to 2 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.