about summary refs log tree commit diff
path: root/compiler/rustc_attr/src
AgeCommit message (Collapse)AuthorLines
2021-02-10Tweak stability attribute diagnostic outputEsteban Küber-11/+16
2021-02-05Never MIR inline functions with a different instruction setTomasz Miąsko-1/+1
2021-01-30Rollup merge of #81468 - est31:cfg_version, r=petrochenkovYuki Okushi-4/+6
cfg(version): treat nightlies as complete This PR makes cfg(version) treat the nightlies for version 1.n.0 as 1.n.0, even though that nightly version might not have all stabilizations and features of the released 1.n.0. This is done for greater convenience for people who want to test a newly stabilized feature on nightly, or in other words, give newly stabilized features as many eyeballs as possible. For users who wish to pin nightlies, this commit adds a -Z assume-incomplete-release option that they can enable if they run into any issues due to this change. Implements the suggestion in https://github.com/rust-lang/rust/issues/64796#issuecomment-640851454
2021-01-29Treat nightlies for a version as completeest31-4/+6
This commit makes cfg(version) treat the nightlies for version 1.n.0 as 1.n.0, even though that nightly version might not have all stabilizations and features of the released 1.n.0. This is done for greater convenience for people who want to test a newly stabilized feature on nightly. For users who wish to pin nightlies, this commit adds a -Z assume-incomplete-release option that they can enable if there are any issues due to this change.
2021-01-26Auto merge of #80692 - Aaron1011:feature/query-result-debug, r=estebankbors-3/+3
Enforce that query results implement Debug Currently, we require that query keys implement `Debug`, but we do not do the same for query values. This can make incremental compilation bugs difficult to debug - there isn't a good place to print out the result loaded from disk. This PR adds `Debug` bounds to several query-related functions, allowing us to debug-print the query value when an 'unstable fingerprint' error occurs. This required adding `#[derive(Debug)]` to a fairly large number of types - hopefully, this doesn't have much of an impact on compiler bootstrapping times.
2021-01-24Replace version_check dependency with own version parsing codeest31-4/+28
This gives compiler maintainers a better degree of control over how the version gets parsed and is a good way to ensure that there are no changes of behaviour in the future. Also, issue a warning if the version is invalid instead of erroring so that we stay forwards compatible with possible future changes of the versioning scheme. Last, this improves the present test a little.
2021-01-16Enforce that query results implement DebugAaron Hill-3/+3
2020-12-14Get rid of `clean::Deprecation`Joshua Nelson-1/+1
This brings the size of `item.deprecation` from 56 to 16 bytes.
2020-12-01Created NestedMetaItem::name_value_literal_span methodGuillaume Gomez-1/+1
2020-11-20Never inline naked functionsTomasz Miąsko-1/+1
The `#[naked]` attribute disabled prologue / epilogue emission for the function and it is responsibility of a developer to provide them. The compiler is no position to inline such functions correctly. Disable inlining of naked functions at LLVM and MIR level.
2020-11-02Improve deprecation attribute diagnostic messages.Mara Bos-1/+2
(From the PR feedback.) Co-authored-by: Esteban Küber <esteban@kuber.com.ar>
2020-11-01Use the right span for errors about #[deprecated] attributes.Mara Bos-11/+9
2020-10-30Fix even more clippy warningsJoshua Nelson-30/+28
2020-10-21switch allow_internal_unstable const fns to rustc_allow_const_fn_unstableFlorian Warzecha-4/+21
2020-10-11Move `PartialOrd` impl out of rustcJoshua Nelson-14/+0
Rustdoc's ordering requirements are probably not relevant to the rest of the compiler.
2020-10-11Switch rustdoc from `clean::Stability` to `rustc_attr::Stability`Joshua Nelson-1/+15
This gives greater type safety and is less work to maintain on the rustdoc end.
2020-10-08Implement the instruction_set attributexd009642-0/+6
2020-09-27Remove `rustc_allow_const_fn_ptr`Dylan MacKenzie-24/+7
This was a hack to work around the lack of an escape hatch for the "min `const fn`" checks in const-stable functions. Now that we have co-opted `allow_internal_unstable` for this purpose, we no longer need the bespoke attribute.
2020-09-25Allow multiple allow_internal_unstable attributesDániel Buga-7/+14
Co-authored-by: varkor <github@varkor.com>
2020-09-23Don't use an if guard to check equality with a constantLingMan-1/+1
Match on it directly instead
2020-09-18use matches!() macro for simple if let conditionsMatthias Krüger-2/+2
2020-08-30mv compiler to compiler/mark-0/+1062