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

17 lines
291 B
Rust
Raw Normal View History

properly mark tests that require panic=abort
2023-06-08 09:18:34 +02:00
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
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: 629ms 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