Files
rust/tests/ui/traits/overflow-computing-ambiguity.rs
David Wood 1fd13fddba tests: add #![rustc_no_implicit_bounds]
After reviewing all tests with `?Sized` and discussing with lcnr, these
tests seem like they could probably benefit from
`#![rustc_no_implicit_bounds]`.
2025-06-27 05:34:08 +00:00

18 lines
291 B
Rust

#![feature(rustc_attrs)]
#![rustc_no_implicit_bounds]
trait Hello {}
struct Foo<'a, T>(&'a T);
impl<'a, T> Hello for Foo<'a, &'a T> where Foo<'a, T>: Hello {}
impl Hello for Foo<'static, i32> {}
fn hello<T: Hello>() {}
fn main() {
hello();
//~^ ERROR type annotations needed
}