bjorn3
9223704f4b
Remove all unused feature gates from the compiler
2025-06-08 14:50:42 +00:00
Diggory Blake
fdb660e851
Limit the size of cgu names when using the -Zhuman-readable-cgu-names
option
...
Prior to this change, cgu names could be generated which would result in
filenames longer than the limit imposed by the OS.
2025-05-26 23:29:26 +01:00
Pietro Albini
2ce08ca5d6
update cfg(bootstrap)
2025-05-12 15:33:37 +02:00
bors
7295b08a17
Auto merge of #131160 - ismailarilik:handle-potential-query-instability-lint-for-rustc-middle, r=oli-obk
...
Handle `rustc_middle` cases of `rustc::potential_query_instability` lint
This PR removes `#![allow(rustc::potential_query_instability)]` line from [`compiler/rustc_middle/src/lib.rs`](https://github.com/rust-lang/rust/blob/master/compiler/rustc_middle/src/lib.rs#L29 ) and converts `FxHash{Map,Set}` types into `FxIndex{Map,Set}` to suppress lint errors.
A somewhat tracking issue: https://github.com/rust-lang/rust/issues/84447
r? `@compiler-errors`
2025-05-06 01:36:23 +00:00
ismailarilik
2426dbcde2
Handle rustc_middle cases of rustc::potential_query_instability lint
2025-05-05 16:36:04 +03:00
Nicholas Nethercote
298c56f4ba
Simplify LazyAttrTokenStream
.
...
This commit does the following.
- Changes it from `Lrc<Box<dyn ToAttrTokenStream>>` to
`Lrc<LazyAttrTokenStreamInner>`.
- Reworks `LazyAttrTokenStreamImpl` as `LazyAttrTokenStreamInner`, which
is a two-variant enum.
- Removes the `ToAttrTokenStream` trait and the two impls of it.
The recursion limit must be increased in some crates otherwise rustdoc
aborts.
2025-04-30 07:10:56 +10:00
est31
7493e1cdf6
Make #![feature(let_chains)] bootstrap conditional in compiler/
2025-04-23 16:40:30 +02:00
Nicholas Nethercote
1830245a22
Remove recursion_limit
increases.
...
These are no longer needed now that `Nonterminal` is gone.
2025-04-02 16:25:27 +11:00
bors
249cb84316
Auto merge of #138414 - matthiaskrgr:rollup-9ablqdb, r=matthiaskrgr
...
Rollup of 7 pull requests
Successful merges:
- #137314 (change definitely unproductive cycles to error)
- #137701 (Convert `ShardedHashMap` to use `hashbrown::HashTable`)
- #138269 (uefi: fs: Implement FileType, FilePermissions and FileAttr)
- #138331 (Use `RUSTC_LINT_FLAGS` more)
- #138345 (Some autodiff cleanups)
- #138387 (intrinsics: remove unnecessary leading underscore from argument names)
- #138390 (fix incorrect tracing log)
r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-12 17:27:43 +00:00
Nicholas Nethercote
ff0a5fe975
Remove #![warn(unreachable_pub)]
from all compiler/
crates.
...
It's no longer necessary now that `-Wunreachable_pub` is being passed.
2025-03-11 13:14:21 +11:00
许杰友 Jieyou Xu (Joe)
063ef18fdc
Revert "Use workspace lints for crates in compiler/
#138084 "
...
Revert <https://github.com/rust-lang/rust/pull/138084 > to buy time to
consider options that avoids breaking downstream usages of cargo on
distributed `rustc-src` artifacts, where such cargo invocations fail due
to inability to inherit `lints` from workspace root manifest's
`workspace.lints` (this is only valid for the source rust-lang/rust
workspace, but not really the distributed `rustc-src` artifacts).
This breakage was reported in
<https://github.com/rust-lang/rust/issues/138304 >.
This reverts commit 48caf81484
, reversing
changes made to c6662879b2
.
2025-03-10 18:12:47 +08:00
Nicholas Nethercote
8a3e03392e
Remove #![warn(unreachable_pub)]
from all compiler/
crates.
...
(Except for `rustc_codegen_cranelift`.)
It's no longer necessary now that `unreachable_pub` is in the workspace
lints.
2025-03-08 08:41:43 +11:00
Nicholas Nethercote
293fe0a966
Increase recursion_limit in numerous crates.
...
This is temporarily needed for `x doc compiler` to work. They can be
removed once the `Nonterminal` is removed (#124141 ).
2025-03-07 14:51:07 +11:00
Trevor Gross
57ce16ca27
Rollup merge of #137109 - bend-n:knife, r=oli-obk
...
stabilize extract_if
Tracking issue: #43244
Closes : #43244
FCP completed: https://github.com/rust-lang/rust/issues/43244#issuecomment-2523595704
2025-02-24 18:46:35 -05:00
bendn
c39f33baae
stabilize extract_if
2025-02-23 21:11:12 +07:00
Josh Stone
3c45324e67
update cfg(bootstrap)
2025-02-18 09:32:44 -08:00
Waffle Lapkin
da9a85a1a6
stabilize feature(trait_upcasting)
2025-02-06 23:30:23 +01:00
Nicholas Nethercote
bd6eb05ccd
Update top-level rustc_middle
comment.
...
- Mention THIR.
- Removed mentions of non-existent READMEs.
2025-02-04 08:34:11 +11:00
Nicholas Nethercote
0825202cf2
Remove unused features from rustc_middle
.
2025-02-04 08:34:08 +11:00
Yotam Ofek
8b57fd9e43
use fmt::from_fn
in more places, instead of using structs that impl formatting traits
2025-01-24 14:45:56 +00:00
Ralf Jung
56ee492a6e
move strict provenance lints to new feature gate, remove old feature gates
2024-10-21 15:22:17 +01:00
Trevor Gross
19f6c17df4
Stabilize const_option
...
This makes the following API stable in const contexts:
impl<T> Option<T> {
pub const fn as_mut(&mut self) -> Option<&mut T>;
pub const fn expect(self, msg: &str) -> T;
pub const fn unwrap(self) -> T;
pub const unsafe fn unwrap_unchecked(self) -> T;
pub const fn take(&mut self) -> Option<T>;
pub const fn replace(&mut self, value: T) -> Option<T>;
}
impl<T> Option<&T> {
pub const fn copied(self) -> Option<T>
where T: Copy;
}
impl<T> Option<&mut T> {
pub const fn copied(self) -> Option<T>
where T: Copy;
}
impl<T, E> Option<Result<T, E>> {
pub const fn transpose(self) -> Result<Option<T>, E>
}
impl<T> Option<Option<T>> {
pub const fn flatten(self) -> Option<T>;
}
The following functions make use of the unstable
`const_precise_live_drops` feature:
- `expect`
- `unwrap`
- `unwrap_unchecked`
- `transpose`
- `flatten`
Fixes: <https://github.com/rust-lang/rust/issues/67441 >
2024-10-12 17:07:13 -04:00
Ralf Jung
c4ce8c114b
make InterpResult a dedicated type to avoid accidentally discarding the error
2024-10-01 21:45:35 +02:00
Josh Stone
0999b019f8
Dogfood feature(file_buffered)
2024-09-24 14:25:16 -07:00
Nicholas Nethercote
acb832d640
Use associative type defaults in {Layout,FnAbi}OfHelpers
.
...
This avoids some repetitive boilerplate code.
2024-09-17 10:25:06 +10:00
Boxy
0091b8ab2a
update cfgs
2024-09-05 17:24:01 +01:00
Nicholas Nethercote
938daf6033
Add warn(unreachable_pub)
to rustc_middle
.
...
I am surprised the diff is so small for this enormous crate.
2024-08-29 20:13:06 +10:00
Jubilee
9d5f794312
Rollup merge of #129401 - workingjubilee:partial-initialization-of-stabilization, r=dtolnay,joboet
...
Partially stabilize `feature(new_uninit)`
Finished comment period: https://github.com/rust-lang/rust/issues/63291#issuecomment-2183022955
The following API has been stabilized from https://github.com/rust-lang/rust/issues/63291
```rust
impl<T> Box<T> { pub fn new_uninit() -> Box<MaybeUninit<T>> {…} }
impl<T> Rc<T> { pub fn new_uninit() -> Rc<MaybeUninit<T>> {…} }
impl<T> Arc<T> { pub fn new_uninit() -> Arc<MaybeUninit<T>> {…} }
impl<T> Box<[T]> { pub fn new_uninit_slice(len: usize) -> Box<[MaybeUninit<T>]> {…} }
impl<T> Rc<[T]> { pub fn new_uninit_slice(len: usize) -> Rc<[MaybeUninit<T>]> {…} }
impl<T> Arc<[T]> { pub fn new_uninit_slice(len: usize) -> Arc<[MaybeUninit<T>]> {…} }
impl<T> Box<MaybeUninit<T>> { pub unsafe fn assume_init(self) -> Box<T> {…} }
impl<T> Box<[MaybeUninit<T>]> { pub unsafe fn assume_init(self) -> Box<[T]> {…} }
impl<T> Rc<MaybeUninit<T>> { pub unsafe fn assume_init(self) -> Rc<T> {…} }
impl<T> Rc<[MaybeUninit<T>]> { pub unsafe fn assume_init(self) -> Rc<[T]> {…} }
impl<T> Arc<MaybeUninit<T>> { pub unsafe fn assume_init(self) -> Arc<T> {…} }
impl<T> Arc<[MaybeUninit<T>]> { pub unsafe fn assume_init(self) -> Arc<[T]> {…} }
```
The remaining API is split between new issues
- `new_zeroed_alloc`: https://github.com/rust-lang/rust/issues/129396
- `box_uninit_write`: https://github.com/rust-lang/rust/issues/129397
All relevant code is thus either stabilized or split out of that issue, so this closes #63291 as, with the FCP concluded, that issue has served its purpose.
try-job: x86_64-rust-for-linux
2024-08-28 19:12:52 -07:00
Jubilee Young
2535a0f776
compiler: Remove feature(new_uninit)
2024-08-27 10:17:05 -07:00
Michael Goulet
38e62b9841
Use unsafe extern blocks throughout the compiler
2024-08-26 19:51:05 -04:00
Ralf Jung
58dcd1c2e6
use the new Box methods in the interpreter
2024-08-14 14:32:17 +02:00
Nadrieril
c256de2253
Update std and compiler
2024-08-10 12:07:17 +02:00
Matthias Krüger
efc3fdc74d
Rollup merge of #125505 - aDotInTheVoid:middle-idl, r=pnkfelix
...
Add intra-doc-links to rustc_middle crate-level docs.
Makes it slightly faster to find these modules, as you don't need to hunt for them in the big list.
2024-06-05 18:21:09 +02:00
Alona Enraght-Moony
9f8b1caf29
Add intra-doc-links to rustc_middle crate-level docs.
2024-05-24 17:17:25 +00:00
Nicholas Nethercote
e9a59dbed8
Remove #[macro_use] extern crate tracing
from rustc_middle
.
2024-05-23 18:02:40 +10:00
Nicholas Nethercote
3ac816a1ca
Sort rustc_middle
attributes.
...
As is already done in several other crates, such as `rustc_errors`.
2024-05-21 14:56:57 +10:00
Nicholas Nethercote
ac847b2583
Remove unused features from rustc_middle
.
2024-05-21 14:56:57 +10:00
Mark Rousskov
a64f941611
Step bootstrap cfgs
2024-05-01 22:19:11 -04:00
Nicholas Nethercote
52e9a23bdc
Remove extern crate smallvec
from a couple of crates.
2024-04-29 18:47:54 +10:00
Nicholas Nethercote
1ab34f063b
Remove extern crate bitflags
from a couple of crates.
2024-04-29 18:47:54 +10:00
Nicholas Nethercote
7418aa1a07
Remove extern crate rustc_data_structures
from numerous crates.
2024-04-29 18:45:14 +10:00
Nicholas Nethercote
6ce258f657
Remove extern crate rustc_macros
from rustc_middle
.
2024-04-29 11:19:16 +10:00
Gary Guo
94c1920497
Stabilise inline_const
2024-04-24 13:12:25 +01:00
Oli Scherer
aef0f4024a
Error on using yield
without also using #[coroutine]
on the closure
...
And suggest adding the `#[coroutine]` to the closure
2024-04-24 08:05:29 +00:00
Markus Reiter
33e68aadc9
Stabilize generic NonZero
.
2024-04-22 18:48:47 +02:00
Mark Rousskov
02f1930595
step cfgs
2024-03-20 08:49:13 -04:00
Oli Scherer
e91084180e
Make span_bug panic site useful again
2024-03-19 09:19:12 +00:00
Michael Goulet
c63f3feb0f
Stabilize associated type bounds
2024-03-08 20:56:25 +00:00
Matthias Krüger
26cb6c7287
Rollup merge of #120742 - Nadrieril:use-min_exh_pats, r=compiler-errors
...
mark `min_exhaustive_patterns` as complete
This is step 1 and 2 of my [proposal](https://github.com/rust-lang/rust/issues/119612#issuecomment-1918097361 ) to move `min_exhaustive_patterns` forward. The vast majority of in-tree use cases of `exhaustive_patterns` are covered by `min_exhaustive_patterns`. There are a few cases that still require `exhaustive_patterns` in tests and they're all behind references.
r? ``@ghost``
2024-02-23 17:02:03 +01:00
Markus Reiter
746a58d435
Use generic NonZero
internally.
2024-02-15 08:09:42 +01:00