Rather than a boolean `--enable-cflags` etc., these options should
reflect that they are for LLVM, and that they need a value. You would
now use `./configure --llvm-cflags="..."`.
Even when buffered. Ideally we would flush only when the emitter is
done, but that requires larger changes. This gives most of the benefit
of buffering in any case.
Currently, function items are always tagged unnamed_addr, which means that
casting a function to a function pointer is not guaranteed to produce a
deterministic address. However, once a function pointer is created, we do expect
that to remain stable. So, this changes the show_usize function to a static
containing a function pointer and uses that for comparisons.
Notably, a *static* may have 'unstable' address, but the function pointer within
it must be constant.
Resolves issue 58320.
This prevents accidental dereferences and so forth of the Void type, as well as
cleaning up the error message to reference Opaque rather than the more
complicated PhantomData type.
Improve #Safety of various methods in core::ptr
For `read`, `read_unaligned`,`read_volatile`, `replace`, and `drop_in_place`:
- The value they point to must be properly initialized
For `replace`, additionally:
- The pointer must be readable
BTree: lighten the load on Miri
Reduce the amount of work Miri ploughs through in btree code, in particular on `test_clone_from` (which takes up 5 minutes on my machine).
r? @crgl
Split librustc::{traits,infer} to a separate crate rustc_infer
This is still very much work in progress.
Three functions are between dimensions (at the end of `rustc::traits`), waiting for some dependency breaking scheme.
Please tell me if the approach seems sound, and how you would like to split this PR up.
The formatting is deliberately off, to ease rebasing.
cc #65031
rustc_session: allow overriding lint level of individual lints from a group
Fixes#58211 and fixesrust-lang/rust-clippy#4778 and fixesrust-lang/rust-clippy#4091
Instead of hard-coding the lint level preferences (from lowest to highest precedence: `lint::Allow -> lint::Warn -> lint::Deny -> lint::Forbid`), the position of the argument in the command line gets taken into account.
Examples:
1. Passing `-D unused -A unused-variables` denies everything in the lint group `unused` **except** `unused-variables` which is explicitly allowed.
1. Passing `-A unused-variables -D unused` denies everything in the lint group `unused` **including** `unused-variables` since the allow is specified before the deny (and therefore overridden by the deny).
This matches the behavior that is already being used when specifying `allow`/`deny` in the source code.