about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.mailmap1
-rw-r--r--CONTRIBUTING.md1
-rw-r--r--compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs10
-rw-r--r--compiler/rustc_trait_selection/src/traits/select/mod.rs12
-rw-r--r--library/core/src/cell.rs2
m---------src/doc/book0
m---------src/doc/rust-by-example0
m---------src/doc/rustc-dev-guide0
-rw-r--r--tests/ui/async-await/missed-capture-issue-107414.rs24
-rw-r--r--tests/ui/fn/fn-ptr-trait-int-float-infer-var.rs10
-rw-r--r--triagebot.toml2
11 files changed, 51 insertions, 11 deletions
diff --git a/.mailmap b/.mailmap
index b8a9fc27eb7..92be3174750 100644
--- a/.mailmap
+++ b/.mailmap
@@ -102,6 +102,7 @@ Carol Willing <carolcode@willingconsulting.com>
 Chandler Deng <chandde@microsoft.com>
 Charles Lew <crlf0710@gmail.com> CrLF0710 <crlf0710@gmail.com>
 Chris C Cerami <chrisccerami@users.noreply.github.com> Chris C Cerami <chrisccerami@gmail.com>
+Chris Denton <chris@chrisdenton.dev> Chris Denton <ChrisDenton@users.noreply.github.com>
 Chris Gregory <czipperz@gmail.com>
 Chris Pardy <chrispardy36@gmail.com>
 Chris Pressey <cpressey@gmail.com>
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index d732075fb2d..dfaa70bb9db 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -33,7 +33,6 @@ find a mentor! You can learn more about asking questions and getting help in the
 Did a compiler error message tell you to come here? If you want to create an ICE report,
 refer to [this section][contributing-bug-reports] and [open an issue][issue template].
 
-[Contributing to Rust]: https://rustc-dev-guide.rust-lang.org/contributing.html#contributing-to-rust
 [rustc-dev-guide]: https://rustc-dev-guide.rust-lang.org/
 [std-dev-guide]: https://std-dev-guide.rust-lang.org/
 [contributing-bug-reports]: https://rustc-dev-guide.rust-lang.org/contributing.html#bug-reports
diff --git a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs
index 47a351590b1..090312338e0 100644
--- a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs
+++ b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs
@@ -998,8 +998,14 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
             | ty::Alias(..)
             | ty::Param(..)
             | ty::Bound(..)
-            | ty::Error(_) => {}
-            ty::Infer(_) => {
+            | ty::Error(_)
+            | ty::Infer(
+                ty::InferTy::IntVar(_)
+                | ty::InferTy::FloatVar(_)
+                | ty::InferTy::FreshIntTy(_)
+                | ty::InferTy::FreshFloatTy(_),
+            ) => {}
+            ty::Infer(ty::InferTy::TyVar(_) | ty::InferTy::FreshTy(_)) => {
                 candidates.ambiguous = true;
             }
         }
diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs
index 3ed3dd2d20d..b58e62536d6 100644
--- a/compiler/rustc_trait_selection/src/traits/select/mod.rs
+++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs
@@ -177,14 +177,14 @@ struct TraitObligationStack<'prev, 'tcx> {
 }
 
 struct SelectionCandidateSet<'tcx> {
-    // A list of candidates that definitely apply to the current
-    // obligation (meaning: types unify).
+    /// A list of candidates that definitely apply to the current
+    /// obligation (meaning: types unify).
     vec: Vec<SelectionCandidate<'tcx>>,
 
-    // If `true`, then there were candidates that might or might
-    // not have applied, but we couldn't tell. This occurs when some
-    // of the input types are type variables, in which case there are
-    // various "builtin" rules that might or might not trigger.
+    /// If `true`, then there were candidates that might or might
+    /// not have applied, but we couldn't tell. This occurs when some
+    /// of the input types are type variables, in which case there are
+    /// various "builtin" rules that might or might not trigger.
     ambiguous: bool,
 }
 
diff --git a/library/core/src/cell.rs b/library/core/src/cell.rs
index 63bce5d0ccd..d728dc03817 100644
--- a/library/core/src/cell.rs
+++ b/library/core/src/cell.rs
@@ -1816,7 +1816,7 @@ impl<T: ?Sized + fmt::Display> fmt::Display for RefMut<'_, T> {
 /// `UnsafeCell<T>` opts-out of the immutability guarantee for `&T`: a shared reference
 /// `&UnsafeCell<T>` may point to data that is being mutated. This is called "interior mutability".
 ///
-/// All other types that allow internal mutability, such as `Cell<T>` and `RefCell<T>`, internally
+/// All other types that allow internal mutability, such as [`Cell<T>`] and [`RefCell<T>`], internally
 /// use `UnsafeCell` to wrap their data.
 ///
 /// Note that only the immutability guarantee for shared references is affected by `UnsafeCell`. The
diff --git a/src/doc/book b/src/doc/book
-Subproject 21a2ed14f4480dab62438dcc1130291bebc6537
+Subproject 0510ca84c2ce6bf93c4ccf9248756e9e4fd00b1
diff --git a/src/doc/rust-by-example b/src/doc/rust-by-example
-Subproject cfbfd648ce33926c3490f24de9a5b56cce404b8
+Subproject ba84bf35d0f17d404003349309201654d25f61a
diff --git a/src/doc/rustc-dev-guide b/src/doc/rustc-dev-guide
-Subproject d08baa166b463537229eeb737c4ccadabd83cf7
+Subproject fca8af6c154c6cde2512f1331cf2704f214a818
diff --git a/tests/ui/async-await/missed-capture-issue-107414.rs b/tests/ui/async-await/missed-capture-issue-107414.rs
new file mode 100644
index 00000000000..0ab4f5ade98
--- /dev/null
+++ b/tests/ui/async-await/missed-capture-issue-107414.rs
@@ -0,0 +1,24 @@
+// check-pass
+// edition:2018
+
+fn main() {}
+
+struct StructA {}
+struct StructB {}
+
+impl StructA {
+    fn fn_taking_struct_b(&self, struct_b: &StructB) -> bool {
+        true
+    }
+}
+
+async fn get_struct_a_async() -> StructA {
+    StructA {}
+}
+
+async fn ice() {
+    match Some(StructB {}) {
+        Some(struct_b) if get_struct_a_async().await.fn_taking_struct_b(&struct_b) => {}
+        _ => {}
+    }
+}
diff --git a/tests/ui/fn/fn-ptr-trait-int-float-infer-var.rs b/tests/ui/fn/fn-ptr-trait-int-float-infer-var.rs
new file mode 100644
index 00000000000..eec7da044c0
--- /dev/null
+++ b/tests/ui/fn/fn-ptr-trait-int-float-infer-var.rs
@@ -0,0 +1,10 @@
+// check-pass
+trait MyCmp {
+    fn cmp(&self) {}
+}
+impl MyCmp for f32 {}
+
+fn main() {
+    // Ensure that `impl<F: FnPtr> Ord for F` is never considered for int and float infer vars.
+    0.0.cmp();
+}
diff --git a/triagebot.toml b/triagebot.toml
index c86c1613fa9..20a8be283b9 100644
--- a/triagebot.toml
+++ b/triagebot.toml
@@ -482,7 +482,7 @@ message = "This PR changes src/bootstrap/defaults/config.codegen.toml. If approp
 
 [assign]
 warn_non_default_branch = true
-contributing_url = "https://rustc-dev-guide.rust-lang.org/contributing.html"
+contributing_url = "https://rustc-dev-guide.rust-lang.org/getting-started.html"
 
 [assign.adhoc_groups]
 compiler-team = [