Commit graph

18 commits

Author SHA1 Message Date
bors a8f7075532 Auto merge of #80692 - Aaron1011:feature/query-result-debug, r=estebank
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-26 05:47:23 +00:00
est31 14aa12fcc2 Replace version_check dependency with own version parsing code
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-24 01:56:54 +01:00
Aaron Hill 7afb32557d
Enforce that query results implement Debug 2021-01-16 17:53:02 -05:00
Joshua Nelson 7d452430fa Get rid of clean::Deprecation
This brings the size of `item.deprecation` from 56 to 16 bytes.
2020-12-14 22:00:46 -05:00
Guillaume Gomez 7df0052df8 Created NestedMetaItem::name_value_literal_span method 2020-12-01 16:26:51 +01:00
Tomasz Miąsko c2fb99984c Never inline naked functions
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-20 00:00:00 +00:00
Mara Bos 9c647d1021 Improve deprecation attribute diagnostic messages.
(From the PR feedback.)

Co-authored-by: Esteban Küber <esteban@kuber.com.ar>
2020-11-02 13:21:18 +01:00
Mara Bos 706bc33651 Use the right span for errors about #[deprecated] attributes. 2020-11-01 20:48:58 +01:00
Joshua Nelson 57c6ed0c07 Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
Florian Warzecha 05f4a9a42a
switch allow_internal_unstable const fns to rustc_allow_const_fn_unstable 2020-10-21 20:54:20 +02:00
Joshua Nelson 96b0446b53 Move PartialOrd impl out of rustc
Rustdoc's ordering requirements are probably not relevant to the rest of
the compiler.
2020-10-11 11:11:33 -04:00
Joshua Nelson cc0d140bae Switch rustdoc from clean::Stability to rustc_attr::Stability
This gives greater type safety and is less work to maintain on the
rustdoc end.
2020-10-11 10:04:17 -04:00
xd009642 a6e2b636e6 Implement the instruction_set attribute 2020-10-08 23:32:20 +01:00
Dylan MacKenzie 3cbd17fcc6 Remove rustc_allow_const_fn_ptr
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-27 10:46:41 -07:00
Dániel Buga 54c9c949a1 Allow multiple allow_internal_unstable attributes
Co-authored-by: varkor <github@varkor.com>
2020-09-25 15:19:46 +02:00
LingMan c07890543d
Don't use an if guard to check equality with a constant
Match on it directly instead
2020-09-23 00:29:56 +02:00
Matthias Krüger 40dddd3305 use matches!() macro for simple if let conditions 2020-09-18 20:28:35 +02:00
mark 9e5f7d5631 mv compiler to compiler/ 2020-08-30 18:45:07 +03:00