about summary refs log tree commit diff
path: root/compiler/rustc_middle/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-09-22 10:34:45 +0000
committerbors <bors@rust-lang.org>2023-09-22 10:34:45 +0000
commit03c199af8e0f10c4fe4ead8e97e65286bef86e7d (patch)
tree9e771d0cbd662db18ef1cc7aaea1316a2e47307b /compiler/rustc_middle/src
parent5a4e47ebedb4132168c1b22262f21f0d3a2a96df (diff)
parent1a18ec0dcf88f35b4682e7f630cbd3b167b56e92 (diff)
downloadrust-03c199af8e0f10c4fe4ead8e97e65286bef86e7d.tar.gz
rust-03c199af8e0f10c4fe4ead8e97e65286bef86e7d.zip
Auto merge of #116054 - matthiaskrgr:rollup-3pusno6, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #114379 (Command: also print removed env vars)
 - #116034 (add UI test for delimiter errors)
 - #116036 (tests/ui: Split large_moves.rs and move to lint/large_assignments)
 - #116038 (Fall back to _SC_NPROCESSORS_ONLN if sched_getaffinity returns an empty mask)
 - #116039 (Account for nested `impl Trait` in TAIT)
 - #116041 (Add note to `is_known_rigid`)
 - #116049 (give FutureIncompatibilityReason variants more explicit names)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_middle/src')
-rw-r--r--compiler/rustc_middle/src/lint.rs9
-rw-r--r--compiler/rustc_middle/src/ty/sty.rs5
2 files changed, 11 insertions, 3 deletions
diff --git a/compiler/rustc_middle/src/lint.rs b/compiler/rustc_middle/src/lint.rs
index 037f84f476f..59849e8eb40 100644
--- a/compiler/rustc_middle/src/lint.rs
+++ b/compiler/rustc_middle/src/lint.rs
@@ -314,7 +314,10 @@ pub fn struct_lint_level(
             // Default allow lints trigger too often for testing.
             sess.opts.unstable_opts.future_incompat_test && lint.default_level != Level::Allow,
             |incompat| {
-                matches!(incompat.reason, FutureIncompatibilityReason::FutureReleaseErrorReportNow)
+                matches!(
+                    incompat.reason,
+                    FutureIncompatibilityReason::FutureReleaseErrorReportInDeps
+                )
             },
         );
 
@@ -404,8 +407,8 @@ pub fn struct_lint_level(
 
         if let Some(future_incompatible) = future_incompatible {
             let explanation = match future_incompatible.reason {
-                FutureIncompatibilityReason::FutureReleaseError
-                | FutureIncompatibilityReason::FutureReleaseErrorReportNow => {
+                FutureIncompatibilityReason::FutureReleaseErrorDontReportInDeps
+                | FutureIncompatibilityReason::FutureReleaseErrorReportInDeps => {
                     "this was previously accepted by the compiler but is being phased out; \
                          it will become a hard error in a future release!"
                         .to_owned()
diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs
index e3e014a3b2a..c37cf384303 100644
--- a/compiler/rustc_middle/src/ty/sty.rs
+++ b/compiler/rustc_middle/src/ty/sty.rs
@@ -2946,6 +2946,11 @@ impl<'tcx> Ty<'tcx> {
         }
     }
 
+    /// Returns `true` when the outermost type cannot be further normalized,
+    /// resolved, or substituted. This includes all primitive types, but also
+    /// things like ADTs and trait objects, sice even if their arguments or
+    /// nested types may be further simplified, the outermost [`TyKind`] or
+    /// type constructor remains the same.
     pub fn is_known_rigid(self) -> bool {
         match self.kind() {
             Bool