Skip to content

Commit d416093

Browse files
committed
Auto merge of #82025 - JohnTitor:rollup-cohp0gy, r=JohnTitor
Rollup of 16 pull requests Successful merges: - #79983 (fix indefinite article in cell.rs) - #81831 (Don't display `mut` in arguments for functions documentation) - #81947 (Relax ItemCtxt::to_ty lifetime) - #81954 (RELEASES.md 1.50: Group platform support notes together) - #81955 (bootstrap: Locate llvm-dwp based on llvm-config bindir) - #81959 (Fix assosiated typo) - #81964 (Fix documentation not showing on localStorage error) - #81968 (bootstrap: fix wrong docs installation path) - #81990 (Make suggestion of changing mutability of arguments broader) - #81994 (Improve long explanation for E0542 and E0546) - #81997 (dist: include src/build_helper as part of the crate graph for rustc-dev) - #82003 (Stack probes: fix error message) - #82004 (clean up clean::Static struct) - #82011 (Fix private intra-doc warnings on associated items) - #82013 (Tell user how to fix CI file being not up to date) - #82017 (Fix typo in mod.rs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents a118ee2 + ff8b7f2 commit d416093

File tree

28 files changed

+288
-135
lines changed

28 files changed

+288
-135
lines changed

RELEASES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Compiler
1212
- [Added tier 3\* support for the `armv5te-unknown-linux-uclibceabi` target.][78142]
1313
- [Added tier 3 support for the `aarch64-apple-ios-macabi` target.][77484]
1414
- [The `x86_64-unknown-freebsd` is now built with the full toolset.][79484]
15+
- [Dropped support for all cloudabi targets.][78439]
1516

1617
\* Refer to Rust's [platform support page][forge-platform-support] for more
1718
information on Rust's tiered platform support.
@@ -77,7 +78,6 @@ Compatibility Notes
7778
- [`#![test]` as an inner attribute is now considered unstable like other inner macro
7879
attributes, and reports an error by default through the `soft_unstable` lint.][79003]
7980
- [Overriding a `forbid` lint at the same level that it was set is now a hard error.][78864]
80-
- [Dropped support for all cloudabi targets.][78439]
8181
- [You can no longer intercept `panic!` calls by supplying your own macro.][78343] It's
8282
recommended to use the `#[panic_handler]` attribute to provide your own implementation.
8383
- [Semi-colons after item statements (e.g. `struct Foo {};`) now produce a warning.][78296]

compiler/rustc_error_codes/src/error_codes/E0542.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn _stable_const_fn() {}
1919
fn _deprecated_fn() {}
2020
```
2121

22-
To fix the issue you need to provide the `since` field.
22+
To fix this issue, you need to provide the `since` field. Example:
2323

2424
```
2525
#![feature(staged_api)]

compiler/rustc_error_codes/src/error_codes/E0546.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fn unstable_fn() {}
1313
fn stable_fn() {}
1414
```
1515

16-
To fix the issue you need to provide the `feature` field.
16+
To fix this issue, you need to provide the `feature` field. Example:
1717

1818
```
1919
#![feature(staged_api)]

compiler/rustc_middle/src/hir/map/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ impl<'hir> Map<'hir> {
285285
let owner = self.tcx.hir_owner_nodes(id.owner);
286286
owner.and_then(|owner| {
287287
let node = owner.nodes[id.local_id].as_ref();
288-
// FIXME(eddyb) use a single generic type insted of having both
288+
// FIXME(eddyb) use a single generic type instead of having both
289289
// `Entry` and `ParentedNode`, which are effectively the same.
290290
// Alternatively, rewrite code using `Entry` to use `ParentedNode`.
291291
node.map(|node| Entry {

compiler/rustc_mir/src/borrow_check/diagnostics/mutability_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
540540
);
541541
}
542542

543-
// Attempt to search similar mutable assosiated items for suggestion.
543+
// Attempt to search similar mutable associated items for suggestion.
544544
// In the future, attempt in all path but initially for RHS of for_loop
545545
fn suggest_similar_mut_method_for_for_loop(&self, err: &mut DiagnosticBuilder<'_>) {
546546
let hir = self.infcx.tcx.hir();

compiler/rustc_target/src/spec/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ impl StackProbeType {
589589
Ok(StackProbeType::InlineOrCall { min_llvm_version_for_inline })
590590
}
591591
_ => Err(String::from(
592-
"`kind` expected to be one of `inline-or-none`, `call` or `inline-or-call`",
592+
"`kind` expected to be one of `none`, `inline`, `call` or `inline-or-call`",
593593
)),
594594
}
595595
}

compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -468,22 +468,21 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
468468
trait_ref,
469469
obligation.cause.body_id,
470470
);
471-
} else {
472-
if !have_alt_message {
473-
// Can't show anything else useful, try to find similar impls.
474-
let impl_candidates = self.find_similar_impl_candidates(trait_ref);
475-
self.report_similar_impl_candidates(impl_candidates, &mut err);
476-
}
477-
// Changing mutability doesn't make a difference to whether we have
478-
// an `Unsize` impl (Fixes ICE in #71036)
479-
if !is_unsize {
480-
self.suggest_change_mut(
481-
&obligation,
482-
&mut err,
483-
trait_ref,
484-
points_at_arg,
485-
);
486-
}
471+
} else if !have_alt_message {
472+
// Can't show anything else useful, try to find similar impls.
473+
let impl_candidates = self.find_similar_impl_candidates(trait_ref);
474+
self.report_similar_impl_candidates(impl_candidates, &mut err);
475+
}
476+
477+
// Changing mutability doesn't make a difference to whether we have
478+
// an `Unsize` impl (Fixes ICE in #71036)
479+
if !is_unsize {
480+
self.suggest_change_mut(
481+
&obligation,
482+
&mut err,
483+
trait_ref,
484+
points_at_arg,
485+
);
487486
}
488487

489488
// If this error is due to `!: Trait` not implemented but `(): Trait` is

compiler/rustc_typeck/src/collect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ impl ItemCtxt<'tcx> {
280280
ItemCtxt { tcx, item_def_id }
281281
}
282282

283-
pub fn to_ty(&self, ast_ty: &'tcx hir::Ty<'tcx>) -> Ty<'tcx> {
283+
pub fn to_ty(&self, ast_ty: &hir::Ty<'_>) -> Ty<'tcx> {
284284
AstConv::ast_ty_to_ty(self, ast_ty)
285285
}
286286

compiler/rustc_typeck/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,7 @@ pub fn hir_ty_to_ty<'tcx>(tcx: TyCtxt<'tcx>, hir_ty: &hir::Ty<'_>) -> Ty<'tcx> {
421421
let env_node_id = tcx.hir().get_parent_item(hir_ty.hir_id);
422422
let env_def_id = tcx.hir().local_def_id(env_node_id);
423423
let item_cx = self::collect::ItemCtxt::new(tcx, env_def_id.to_def_id());
424-
425-
astconv::AstConv::ast_ty_to_ty(&item_cx, hir_ty)
424+
item_cx.to_ty(hir_ty)
426425
}
427426

428427
pub fn hir_trait_to_predicates<'tcx>(

library/core/src/cell.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1622,7 +1622,7 @@ impl<T: ?Sized + fmt::Display> fmt::Display for RefMut<'_, T> {
16221622
/// `UnsafeCell<T>` is a type that wraps some `T` and indicates unsafe interior operations on the
16231623
/// wrapped type. Types with an `UnsafeCell<T>` field are considered to have an 'unsafe interior'.
16241624
/// The `UnsafeCell<T>` type is the only legal way to obtain aliasable data that is considered
1625-
/// mutable. In general, transmuting an `&T` type into an `&mut T` is considered undefined behavior.
1625+
/// mutable. In general, transmuting a `&T` type into a `&mut T` is considered undefined behavior.
16261626
///
16271627
/// If you have a reference `&SomeStruct`, then normally in Rust all fields of `SomeStruct` are
16281628
/// immutable. The compiler makes optimizations based on the knowledge that `&T` is not mutably

0 commit comments

Comments
 (0)