forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#67631 - oli-obk:polymorphic_promotion, r=we…
…sleywiser Work around a resolve bug in const prop r? @wesleywiser @anp This isn't exposed right now, but further changes to rustc may start causing bugs without this.
- Loading branch information
Showing
10 changed files
with
223 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#![feature(specialization)] | ||
|
||
fn main() { | ||
let x = <Vec::<()> as Foo>::bar(); | ||
} | ||
|
||
trait Foo { | ||
fn bar() -> u32; | ||
} | ||
|
||
impl<T> Foo for Vec<T> { | ||
#[inline(always)] | ||
default fn bar() -> u32 { 123 } | ||
} | ||
|
||
// END RUST SOURCE | ||
// START rustc.main.Inline.before.mir | ||
// let mut _0: (); | ||
// let _1: u32; | ||
// scope 1 { | ||
// debug x => _1; | ||
// } | ||
// bb0: { | ||
// StorageLive(_1); | ||
// _1 = const <std::vec::Vec<()> as Foo>::bar() -> bb1; | ||
// } | ||
// bb1: { | ||
// _0 = (); | ||
// StorageDead(_1); | ||
// return; | ||
// } | ||
// END rustc.main.Inline.before.mir | ||
// START rustc.main.Inline.after.mir | ||
// let mut _0: (); | ||
// let _1: u32; | ||
// scope 1 { | ||
// debug x => _1; | ||
// } | ||
// scope 2 { | ||
// } | ||
// bb0: { | ||
// StorageLive(_1); | ||
// _1 = const 123u32; | ||
// _0 = (); | ||
// StorageDead(_1); | ||
// return; | ||
// } | ||
// END rustc.main.Inline.after.mir |
Oops, something went wrong.