-
Notifications
You must be signed in to change notification settings - Fork 13.4k
trait objects of a fundamental trait are treated as fundamental types #56503
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
Comments
This should either be fixed ( |
Discussed in the @rust-lang/lang meeting. We decided that for now we should just make |
No warning period needed because this is a nightly feature? I think I'll |
arielb1
added a commit
to arielb1/rust
that referenced
this issue
Dec 15, 2018
pietroalbini
added a commit
to pietroalbini/rust
that referenced
this issue
Dec 20, 2018
…matsakis stop treating trait objects from #[fundamental] traits as fundamental This is a [breaking-change] to code that exploits this functionality (which should be limited to code using `#![feature(fundamental)]`. Fixes rust-lang#56503. r? @nikomatsakis
Mark-Simulacrum
added a commit
to Mark-Simulacrum/rust
that referenced
this issue
Dec 21, 2018
…matsakis stop treating trait objects from #[fundamental] traits as fundamental This is a [breaking-change] to code that exploits this functionality (which should be limited to code using `#![feature(fundamental)]`. Fixes rust-lang#56503. r? @nikomatsakis
Centril
added a commit
to Centril/rust
that referenced
this issue
Dec 22, 2018
…matsakis stop treating trait objects from #[fundamental] traits as fundamental This is a [breaking-change] to code that exploits this functionality (which should be limited to code using `#![feature(fundamental)]`. Fixes rust-lang#56503. r? @nikomatsakis
bors
added a commit
that referenced
this issue
Dec 22, 2018
stop treating trait objects from #[fundamental] traits as fundamental This is a [breaking-change] to code that exploits this functionality (which should be limited to code using `#![feature(fundamental)]`. Fixes #56503. r? @nikomatsakis
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Uh oh!
There was an error while loading. Please reload this page.
I don't think this is intentional, at least it is not documented in the RFCs 1023 or 2451:
STR
Crate a (compile with
should_not_have_an_effect
):Crate b:
Expected Result
The
cfg_attr
does not have an effect - the code gives this error:Actual result
With
--cfg should_not_have_an_effect
, the code compilesStability consequences
This can't be observed in stable code right now - the only stable
#[fundamental]
traits areSized
(which doesn't have type parameters) and theFn
traits (which can only be implemented for tuples, and these are never fundamental). However, if we did stabilize a "normal"#[fundamental]
trait with type parameters, this would be visible on stable.The text was updated successfully, but these errors were encountered: