Skip to content

Commit d297f68

Browse files
Rollup merge of rust-lang#51291 - evincarofautumn:master, r=oli-obk
Fix typos of ‘ambiguous’ I had trouble finding this code because of the typo after it was [referenced in a tweet](https://twitter.com/bstrie/status/1002751044605153280). Also fixes an identical but unrelated typo in a comment.
2 parents 5a575b5 + 562d97d commit d297f68

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/librustc/traits/project.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl<'tcx> ProjectionTyCandidateSet<'tcx> {
146146
// was not used). On other paths, it is not assigned,
147147
// and hence if those paths *could* reach the code that
148148
// comes after the match, this fn would not compile.
149-
let convert_to_ambigious;
149+
let convert_to_ambiguous;
150150

151151
match self {
152152
None => {
@@ -169,10 +169,10 @@ impl<'tcx> ProjectionTyCandidateSet<'tcx> {
169169
// clauses are the safer choice. See the comment on
170170
// `select::SelectionCandidate` and #21974 for more details.
171171
match (current, candidate) {
172-
(ParamEnv(..), ParamEnv(..)) => convert_to_ambigious = (),
172+
(ParamEnv(..), ParamEnv(..)) => convert_to_ambiguous = (),
173173
(ParamEnv(..), _) => return false,
174174
(_, ParamEnv(..)) => { unreachable!(); }
175-
(_, _) => convert_to_ambigious = (),
175+
(_, _) => convert_to_ambiguous = (),
176176
}
177177
}
178178

@@ -183,7 +183,7 @@ impl<'tcx> ProjectionTyCandidateSet<'tcx> {
183183

184184
// We only ever get here when we moved from a single candidate
185185
// to ambiguous.
186-
let () = convert_to_ambigious;
186+
let () = convert_to_ambiguous;
187187
*self = Ambiguous;
188188
false
189189
}

src/librustc/traits/query/normalize.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl<'cx, 'gcx, 'tcx> At<'cx, 'gcx, 'tcx> {
3333
/// normalized. If you don't care about regions, you should prefer
3434
/// `normalize_erasing_regions`, which is more efficient.
3535
///
36-
/// If the normalization succeeds and is unambigious, returns back
36+
/// If the normalization succeeds and is unambiguous, returns back
3737
/// the normalized value along with various outlives relations (in
3838
/// the form of obligations that must be discharged).
3939
///

0 commit comments

Comments
 (0)