-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Enable recursion for visit_ty in lint visitor #22943
Conversation
r? @pcwalton (rust_highfive has picked a reviewer for you, use r? to override) |
@bors: r+ 3ad59a0 Thanks! |
⌛ Testing commit 3ad59a0 with merge 0a2bc7f... |
⌛ Testing commit 3ad59a0 with merge f78333e... |
@bors: r- |
Looks like that macro is only used internally in the tests, and the parsing is off for those. I guess adding some parens might help? |
💔 Test failed - auto-linux-64-nopt-t |
Probably needs d3cc32f (not tested yet) |
I got this failure as part of the rollup
|
Relevant IRC logs |
@Manishearth didn't get the error on my 64bit machine, so it's definitely a machine dependent error since it the |
* The lint visitor's visit_ty method did not recurse, and had a reference to the now closed #10894 * The newly enabled recursion has only affected the `deprectated` lint which now detects uses of deprecated items in trait impls and function return types * Renamed some references to `CowString` and `CowVec` to `Cow<str>` and `Cow<[T]>`, respectively, which appear outside of the crate which defines them * Replaced a few instances of `InvariantType<T>` with `PhantomData<Cell<T>>` * Disabled the `deprecated` lint in several places that reference/implement traits on deprecated items which will get cleaned up in the future * Disabled the `exceeding_bitshifts` lint for compile-fail/huge-array-simple test so it doesn't shadow the expected error on 32bit systems * Unfortunately, this means that if a library declares `#![deny(deprecated)]` and marks anything as deprecated, it will have to disable the lint for any uses of said item, e.g. any impl the now deprecated item For any library that denies deprecated items but has deprecated items of its own, this is a [breaking-change]
@alexcrichton updated the PR branch with a fix for that failing test case and incorporated @Manishearth syntax fix |
* The lint visitor's visit_ty method did not recurse, and had a reference to the now closed rust-lang#10894 * The newly enabled recursion has only affected the `deprectated` lint which now detects uses of deprecated items in trait impls and function return types * Renamed some references to `CowString` and `CowVec` to `Cow<str>` and `Cow<[T]>`, respectively, which appear outside of the crate which defines them * Replaced a few instances of `InvariantType<T>` with `PhantomData<Cell<T>>` * Disabled the `deprecated` lint in several places that reference/implement traits on deprecated items which will get cleaned up in the future * Unfortunately, this means that if a library declares `#![deny(deprecated)]` and marks anything as deprecated, it will have to disable the lint for any uses of said item, e.g. any impl the now deprecated item For any library that denies deprecated items but has deprecated items of its own, this is a [breaking-change] I had originally intended for the lint to ignore uses of deprecated items that are declared in the same crate, but this goes against some previous test cases that expect the lint to capture *all* uses of deprecated items, so I maintained the previous approach to avoid changing the expected behavior of the lint. Tested locally on OS X, so hopefully there aren't any deprecated item uses behind a `cfg` that I may have missed.
reference to the now closed Enabling recursion in Visitor.visit_ty makes the compiler reject fixed-length arrays #10894
deprectated
lintwhich now detects uses of deprecated items in trait impls and
function return types
CowString
andCowVec
toCow<str>
andCow<[T]>
, respectively, which appear outside of the crate whichdefines them
InvariantType<T>
withPhantomData<Cell<T>>
deprecated
lint in several places thatreference/implement traits on deprecated items which will get cleaned
up in the future
#![deny(deprecated)]
and marks anything as deprecated, it will haveto disable the lint for any uses of said item, e.g. any impl the now
deprecated item
For any library that denies deprecated items but has deprecated items
of its own, this is a [breaking-change]
I had originally intended for the lint to ignore uses of deprecated items that are declared in the same crate, but this goes against some previous test cases that expect the lint to capture all uses of deprecated items, so I maintained the previous approach to avoid changing the expected behavior of the lint.
Tested locally on OS X, so hopefully there aren't any deprecated item uses behind a
cfg
that I may have missed.