about summary refs log tree commit diff
path: root/compiler/rustc_feature/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2023-08-06Issue numbers are enforced on active features; remove FIXMEMartin Nordholts-2/+0
2023-05-24Use `is_some_and`/`is_ok_and` in less obvious spotsMaybe Waffle-1/+1
2023-05-24Use `Option::is_some_and` and `Result::is_ok_and` in the compilerMaybe Waffle-5/+4
2023-03-29Stabilize a portion of 'once_cell'Trevor Gross-1/+1
Move items not part of this stabilization to 'lazy_cell' or 'once_cell_try'
2023-01-12Allow setting CFG_DISABLE_UNSTABLE_FEATURES to 0Collin Baker-1/+2
Two locations check whether this build-time environment variable is defined. Allowing it to be explicitly disabled with a "0" value is useful, especially for integrating with external build systems.
2023-01-05Fix `uninlined_format_args` for some compiler cratesnils-1/+1
Convert all the crates that have had their diagnostic migration completed (except save_analysis because that will be deleted soon and apfloat because of the licensing problem).
2022-09-06get_attr should check that no duplicates are allowedyukang-2/+2
2022-08-18Add diagnostic translation lints to crates that don't emit them5225225-0/+2
2022-05-27Finish bumping stage0Mark Rousskov-1/+0
It looks like the last time had left some remaining cfg's -- which made me think that the stage0 bump was actually successful. This brings us to a released 1.62 beta though.
2022-05-10don't encode only locally used attrslcnr-2/+3
2022-04-07Stabilize `derive_default_enum`Jacob Pratt-1/+1
2021-11-18Check for duplicate attributes.Eric Huss-0/+2
2021-09-09Ignore automatically derived impls of `Clone` and `Debug` in dead code analysisFabian Wolff-1/+0
2021-06-28Make incomplete features part of delcarationSmitty-1/+1
This prevents mistakes where the feature is in the list of incomplete features but not actually a feature by making the incompleteness a part of the declaration.
2021-04-08Fix outdated crate names in compiler docspierwill-1/+1
Changes `librustc_X` to `rustc_X`, only in documentation comments. Plain code comments are left unchanged. Also fix incorrect file paths.
2020-12-12tidy: Re-enable check for inline unit testsVadim Petrochenkov-27/+3
2020-11-07Allow making `RUSTC_BOOTSTRAP` conditional on the crate nameJoshua Nelson-3/+39
The main change is that `UnstableOptions::from_environment` now requires an (optional) crate name. If the crate name is unknown (`None`), then the new feature is not available and you still have to use `RUSTC_BOOTSTRAP=1`. In practice this means the feature is only available for `--crate-name`, not for `#![crate_name]`; I'm interested in supporting the second but I'm not sure how. Other major changes: - Added `Session::is_nightly_build()`, which uses the `crate_name` of the session - Added `nightly_options::match_is_nightly_build`, a convenience method for looking up `--crate-name` from CLI arguments. `Session::is_nightly_build()`should be preferred where possible, since it will take into account `#![crate_name]` (I think). - Added `unstable_features` to `rustdoc::RenderOptions` There is a user-facing change here: things like `RUSTC_BOOTSTRAP=0` no longer active nightly features. In practice this shouldn't be a big deal, since `RUSTC_BOOTSTRAP` is the opposite of stable and everyone uses `RUSTC_BOOTSTRAP=1` anyway. - Add tests Check against `Cheat`, not whether nightly features are allowed. Nightly features are always allowed on the nightly channel. - Only call `is_nightly_build()` once within a function - Use booleans consistently for rustc_incremental Sessions can't be passed through threads, so `read_file` couldn't take a session. To be consistent, also take a boolean in `write_file_header`.
2020-10-01Add note about possible future improvementMara Bos-0/+2
Co-authored-by: David Tolnay <dtolnay@gmail.com>
2020-09-17Fix 'FIXME' about using NonZeroU32 instead of u32.Mara Bos-10/+11
It was blocked by #58732 (const fn NonZeroU32::new), which is fixed now.
2020-09-04Implementation of incompatible features errorAmjad Alsharafi-1/+1
If two features are defined as incompatible, using them together would result in an error
2020-09-01feature: replace `lazy_static` by `SyncLazy` from stdmarmeladema-0/+2
2020-08-30mv compiler to compiler/mark-0/+137