-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
A-grammarArea: The grammar of RustArea: The grammar of Rust
Milestone
Description
While ifaces with the name copy and send can be declared and implemented, they are always shadowed by the copy and send kind bounds when used like fn f<T: send>. A small inconsistency.
iface send {
fn f();
}
fn f<T: send>(t: T) {
t.f();
}
fn main() {
}
../src/test/run-pass/test.rs:6:4: 6:7 error: attempted access of field f on type 'a, but no public field or method with that name was found
../src/test/run-pass/test.rs:6 t.f();
^~~
../src/test/run-pass/test.rs:6:4: 6:9 error: the type of this value must be known in this context
../src/test/run-pass/test.rs:6 t.f();
^~~~~
Metadata
Metadata
Assignees
Labels
A-grammarArea: The grammar of RustArea: The grammar of Rust