Skip to content

Commit 7a76fe7

Browse files
committed
Auto merge of #66175 - JohnTitor:rollup-ihqk5vn, r=JohnTitor
Rollup of 12 pull requests Successful merges: - #65794 (gate rustc_on_unimplemented under rustc_attrs) - #65945 (Optimize long-linker-command-line test) - #66044 (Improve uninit/zeroed lint) - #66076 (HIR docs: mention how to resolve method paths) - #66084 (Do not require extra LLVM backends for `x.py test` to pass) - #66111 (improve from_raw_parts docs) - #66114 (Improve std::thread::Result documentation) - #66117 (Fixed PhantomData markers in Arc and Rc) - #66146 (Remove unused parameters in `__thread_local_inner`) - #66147 (Miri: Refactor to_scalar_ptr out of existence) - #66162 (Fix broken link in README) - #66171 (Update link on CONTRIBUTING.md) Failed merges: r? @ghost
2 parents caf0187 + b59d166 commit 7a76fe7

File tree

45 files changed

+318
-335
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+318
-335
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ contributions to the compiler and the standard library. It also lists some
105105
really useful commands to the build system (`./x.py`), which could save you a
106106
lot of time.
107107

108-
[rustcguidebuild]: https://rust-lang.github.io/rustc-guide/how-to-build-and-run.html
108+
[rustcguidebuild]: https://rust-lang.github.io/rustc-guide/building/how-to-build-and-run.html
109109

110110
## Pull Requests
111111
[pull-requests]: #pull-requests

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The Rust build system has a Python script called `x.py` to bootstrap building
2121
the compiler. More information about it may be found by running `./x.py --help`
2222
or reading the [rustc guide][rustcguidebuild].
2323

24-
[rustcguidebuild]: https://rust-lang.github.io/rustc-guide/how-to-build-and-run.html
24+
[rustcguidebuild]: https://rust-lang.github.io/rustc-guide/building/how-to-build-and-run.html
2525

2626
### Building on *nix
2727
1. Make sure you have installed the dependencies:

src/doc/unstable-book/src/language-features/on-unimplemented.md

Lines changed: 0 additions & 154 deletions
This file was deleted.

src/liballoc/collections/linked_list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ impl<T> Clone for Iter<'_, T> {
9090
#[stable(feature = "rust1", since = "1.0.0")]
9191
pub struct IterMut<'a, T: 'a> {
9292
// We do *not* exclusively own the entire list here, references to node's `element`
93-
// have been handed out by the iterator! So be careful when using this; the methods
93+
// have been handed out by the iterator! So be careful when using this; the methods
9494
// called must be aware that there can be aliasing pointers to `element`.
9595
list: &'a mut LinkedList<T>,
9696
head: Option<NonNull<Node<T>>>,

src/liballoc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
#![feature(unsize)]
117117
#![feature(unsized_locals)]
118118
#![feature(allocator_internals)]
119-
#![feature(on_unimplemented)]
119+
#![cfg_attr(bootstrap, feature(on_unimplemented))]
120120
#![feature(rustc_const_unstable)]
121121
#![feature(slice_partition_dedup)]
122122
#![feature(maybe_uninit_extra, maybe_uninit_slice)]

src/liballoc/rc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ struct RcBox<T: ?Sized> {
280280
#[stable(feature = "rust1", since = "1.0.0")]
281281
pub struct Rc<T: ?Sized> {
282282
ptr: NonNull<RcBox<T>>,
283-
phantom: PhantomData<T>,
283+
phantom: PhantomData<RcBox<T>>,
284284
}
285285

286286
#[stable(feature = "rust1", since = "1.0.0")]

src/liballoc/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ impl String {
687687
/// checked:
688688
///
689689
/// * The memory at `ptr` needs to have been previously allocated by the
690-
/// same allocator the standard library uses.
690+
/// same allocator the standard library uses, with a required alignment of exactly 1.
691691
/// * `length` needs to be less than or equal to `capacity`.
692692
/// * `capacity` needs to be the correct value.
693693
///

src/liballoc/sync.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
195195
#[stable(feature = "rust1", since = "1.0.0")]
196196
pub struct Arc<T: ?Sized> {
197197
ptr: NonNull<ArcInner<T>>,
198-
phantom: PhantomData<T>,
198+
phantom: PhantomData<ArcInner<T>>,
199199
}
200200

201201
#[stable(feature = "rust1", since = "1.0.0")]

src/libcore/cell.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,11 @@
137137
//! use std::cell::Cell;
138138
//! use std::ptr::NonNull;
139139
//! use std::intrinsics::abort;
140+
//! use std::marker::PhantomData;
140141
//!
141142
//! struct Rc<T: ?Sized> {
142-
//! ptr: NonNull<RcBox<T>>
143+
//! ptr: NonNull<RcBox<T>>,
144+
//! phantom: PhantomData<RcBox<T>>,
143145
//! }
144146
//!
145147
//! struct RcBox<T: ?Sized> {
@@ -151,7 +153,10 @@
151153
//! impl<T: ?Sized> Clone for Rc<T> {
152154
//! fn clone(&self) -> Rc<T> {
153155
//! self.inc_strong();
154-
//! Rc { ptr: self.ptr }
156+
//! Rc {
157+
//! ptr: self.ptr,
158+
//! phantom: PhantomData,
159+
//! }
155160
//! }
156161
//! }
157162
//!

src/libcore/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
#![feature(nll)]
9090
#![feature(exhaustive_patterns)]
9191
#![feature(no_core)]
92-
#![feature(on_unimplemented)]
92+
#![cfg_attr(bootstrap, feature(on_unimplemented))]
9393
#![feature(optin_builtin_traits)]
9494
#![feature(prelude_import)]
9595
#![feature(repr_simd, platform_intrinsics)]

0 commit comments

Comments
 (0)