Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b61e694

Browse files
committedSep 28, 2019
Auto merge of #64883 - Centril:rollup-uehjt63, r=Centril
Rollup of 10 pull requests Successful merges: - #64131 (data_structures: Add deterministic FxHashMap and FxHashSet wrappers) - #64387 (Fix redundant semicolon lint interaction with proc macro attributes) - #64678 (added more context for duplicate lang item errors (fixes #60561)) - #64763 (Add E0734 and its long explanation) - #64793 (Fix format macro expansions spans to be macro-generated) - #64837 (Improve wording in documentation of MaybeUninit) - #64852 (Print ParamTy span when accessing a field (#52082)) - #64875 (Upgrade async/await to "used" keywords.) - #64876 (Fix typo in intrinsics op safety) - #64880 (Slice docs: fix typo) Failed merges: r? @ghost
2 parents 488381c + 4652671 commit b61e694

File tree

54 files changed

+620
-163
lines changed

Some content is hidden

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

54 files changed

+620
-163
lines changed
 

‎src/libcore/mem/maybe_uninit.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ use crate::mem::ManuallyDrop;
55
///
66
/// # Initialization invariant
77
///
8-
/// The compiler, in general, assumes that variables are properly initialized
9-
/// at their respective type. For example, a variable of reference type must
10-
/// be aligned and non-NULL. This is an invariant that must *always* be upheld,
11-
/// even in unsafe code. As a consequence, zero-initializing a variable of reference
12-
/// type causes instantaneous [undefined behavior][ub], no matter whether that reference
13-
/// ever gets used to access memory:
8+
/// The compiler, in general, assumes that a variable is properly initialized
9+
/// according to the requirements of the variable's type. For example, a variable of
10+
/// reference type must be aligned and non-NULL. This is an invariant that must
11+
/// *always* be upheld, even in unsafe code. As a consequence, zero-initializing a
12+
/// variable of reference type causes instantaneous [undefined behavior][ub],
13+
/// no matter whether that reference ever gets used to access memory:
1414
///
1515
/// ```rust,no_run
1616
/// # #![allow(invalid_value)]

‎src/librustc/error_codes.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2217,6 +2217,23 @@ Examples of erroneous code:
22172217
static X: u32 = 42;
22182218
```
22192219
"##,
2220+
2221+
E0734: r##"
2222+
A stability attribute has been used outside of the standard library.
2223+
2224+
Erroneous code examples:
2225+
2226+
```compile_fail,E0734
2227+
#[rustc_deprecated(since = "b", reason = "text")] // invalid
2228+
#[stable(feature = "a", since = "b")] // invalid
2229+
#[unstable(feature = "b", issue = "0")] // invalid
2230+
fn foo(){}
2231+
```
2232+
2233+
These attributes are meant to only be used by the standard library and are
2234+
rejected in your own crates.
2235+
"##,
2236+
22202237
;
22212238
// E0006, // merged with E0005
22222239
// E0101, // replaced with E0282

0 commit comments

Comments
 (0)
Please sign in to comment.