-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustc: Fix a number of stability lint holes #22127
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
r? @aturon |
4ded3bc
to
9bc0d47
Compare
@@ -1119,8 +1119,7 @@ impl<'a, T: ?Sized> DerefMut for &'a mut T { | |||
|
|||
/// A version of the call operator that takes an immutable receiver. | |||
#[lang="fn"] | |||
#[unstable(feature = "core", | |||
reason = "uncertain about variadic generics, input versus associated types")] | |||
#[stable(feature = "rust1", since = "1.0.0")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uhoh. These are supposed to stay unstable, and only be usable via the ->
sugar.
Nice! @alexcrichton answered my questions on IRC. @bors: r+ 9bc0d47 |
9bc0d47
to
bbbb571
Compare
There are a number of holes that the stability lint did not previously cover, including: * Types * Bounds on type parameters on functions and impls * Where clauses * Imports * Patterns (structs and enums) These holes have all been fixed by overriding the `visit_path` function on the AST visitor instead of a few specialized cases. This change also necessitated a few stability changes: * The `collections::fmt` module is now stable (it was already supposed to be). * The `thread_local::imp::Key` type is now stable (it was already supposed to be). * The `std::rt::{begin_unwind, begin_unwind_fmt}` functions are now stable. These are required via the `panic!` macro. * The `std::old_io::stdio::{println, println_args}` functions are now stable. These are required by the `print!` and `println!` macros. * The `ops::{FnOnce, FnMut, Fn}` traits are now `#[stable]`. This is required to make bounds with these traits stable. Note that manual implementations of these traits are still gated by default, this stability only allows bounds such as `F: FnOnce()`. Additionally, the compiler now has special logic to ignore its own generated `__test` module for the `--test` harness in terms of stability. Closes rust-lang#8962 Closes rust-lang#16360 Closes rust-lang#20327 [breaking-change]
⌛ Testing commit bbbb571 with merge 9d02ab1... |
There are a number of holes that the stability lint did not previously cover, including: * Types * Bounds on type parameters on functions and impls * Where clauses * Imports * Patterns (structs and enums) These holes have all been fixed by overriding the `visit_path` function on the AST visitor instead of a few specialized cases. This change also necessitated a few stability changes: * The `collections::fmt` module is now stable (it was already supposed to be). * The `thread_local::imp::Key` type is now stable (it was already supposed to be). * The `std::rt::{begin_unwind, begin_unwind_fmt}` functions are now stable. These are required via the `panic!` macro. * The `std::old_io::stdio::{println, println_args}` functions are now stable. These are required by the `print!` and `println!` macros. * The `ops::{FnOnce, FnMut, Fn}` traits are now `#[stable]`. This is required to make bounds with these traits stable. Note that manual implementations of these traits are still gated by default, this stability only allows bounds such as `F: FnOnce()`. Closes rust-lang#8962 Closes rust-lang#16360 Closes rust-lang#20327
💔 Test failed - auto-win-64-opt |
@bors: retry |
⌛ Testing commit bbbb571 with merge 7fd79f4... |
💔 Test failed - auto-linux-64-x-android-t |
@bors: retry |
Amazing. |
There are a number of holes that the stability lint did not previously cover,
including:
These holes have all been fixed by overriding the
visit_path
function on theAST visitor instead of a few specialized cases. This change also necessitated a
few stability changes:
collections::fmt
module is now stable (it was already supposed to be).thread_local::imp::Key
type is now stable (it was already supposed tobe).
std::rt::{begin_unwind, begin_unwind_fmt}
functions are now stable.These are required via the
panic!
macro.std::old_io::stdio::{println, println_args}
functions are now stable.These are required by the
print!
andprintln!
macros.ops::{FnOnce, FnMut, Fn}
traits are now#[stable]
. This is required tomake bounds with these traits stable. Note that manual implementations of
these traits are still gated by default, this stability only allows bounds
such as
F: FnOnce()
.Closes #8962
Closes #16360
Closes #20327