Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
300901b70509a0af2d971aa6f6104300da24212c
rust/tests/mir-opt/inline/inline_specialization.rs

16 lines
255 B
Rust
Raw Normal View History

Fix `Instance::resolve()` incorrectly returning specialized instances We only want to return specializations when `Reveal::All` is passed, not when `Reveal::UserFacing` is. Resolving this fixes several issues with the `ConstProp`, `SimplifyBranches`, and `Inline` MIR optimization passes. Fixes #66901
2019-12-27 11:44:36 -05:00
#![feature(specialization)]
add crate name to mir dumps
2020-07-27 21:22:43 +02:00
// EMIT_MIR inline_specialization.main.Inline.diff
Fix `Instance::resolve()` incorrectly returning specialized instances We only want to return specializations when `Reveal::All` is passed, not when `Reveal::UserFacing` is. Resolving this fixes several issues with the `ConstProp`, `SimplifyBranches`, and `Inline` MIR optimization passes. Fixes #66901
2019-12-27 11:44:36 -05:00
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 }
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 923ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API