Auto merge of #87476 - pietroalbini:stable-next, r=Mark-Simulacrum · rust-lang/rust@a178d03 (original) (raw)

``

1

`+

Version 1.54.0 (2021-07-29)

`

``

2

`+

============================

`

``

3

+

``

4

`+

Language

`

``

5

`+


`

``

6

+

``

7

`+

`

``

8

`+

While a seemingly minor addition on its own, this enables a lot of

`

``

9

`+

powerful functionality when combined correctly. Most notably you can

`

``

10

`+

now include external documentation in your crate by writing the following.

`

``

11


 ```rust

``

12

`+

#![doc = include_str!("README.md")]

`

``

13


 ```

``

14

`+

You can also use this to include auto-generated modules:

`

``

15


 ```rust

``

16

`+

#[path = concat!(env!("OUT_DIR"), "/generated.rs")]

`

``

17

`+

mod generated;

`

``

18


 ```

``

19

+

``

20

`+

`

``

21

`` +

unsized slices) in const fn.]85078

``

``

22

`` +

``

``

23

`+

lifetimes don't explicitly outlive another.]84701 In code this means

`

``

24

`` +

that you can now have impl Trait<'a, 'b> where as before you could

``

``

25

`` +

only have impl Trait<'a, 'b> where 'b: 'a.

``

``

26

+

``

27

`+

Compiler

`

``

28

`+


`

``

29

+

``

30

`+

`

``

31

`` +

/lib/rustlib/<target-triple>/target.json where / is the "sysroot"

``

``

32

`+

directory.]83800 You can find your sysroot directory by running

`

``

33

`` +

rustc --print sysroot.

``

``

34

`` +

``

``

35

`` +

``

``

36

`+

WebAssembly platforms.]84988

`

``

37

`+

`

``

38

`` +

``

``

39

`` +

and bpfeb-unknown-none.]79608

``

``

40

+

``

41

`+

* Refer to Rust's [platform support page][platform-support-doc] for more

`

``

42

`+

information on Rust's tiered platform support.

`

``

43

+

``

44

`+

Libraries

`

``

45

`+


`

``

46

+

``

47

`` +

``

``

48

`` +

``

``

49

`` +

``

``

50

`+

`

``

51

`+

significantly refactored.]83278 The main user-visible changes are

`

``

52

`+

a 50% reduction in the size of libcore.rlib and stricter validation

`

``

53

`+

of constant operands passed to intrinsics. The latter is technically

`

``

54

`+

a breaking change, but allows Rust to more closely match the C vendor

`

``

55

`+

intrinsics API.

`

``

56

+

``

57

`+

Stabilized APIs

`

``

58

`+


`

``

59

+

``

60

`` +

``

``

61

`` +

``

``

62

`` +

``

``

63

`` +

``

``

64

`` +

``

``

65

`` +

``

``

66

`` +

``

``

67

`` +

``

``

68

`` +

``

``

69

+

``

70

`+

Cargo

`

``

71

`+


`

``

72

+

``

73

`` +

``

``

74

`+

the dependency graph.]cargo/9520

`

``

75

`` +

``

``

76

`+

in the tree ]cargo/9499

`

``

77

`` +

``

``

78

`+

macro dependencies.]cargo/9488

`

``

79

`` +

``

``

80

`+

This variable points to a directory that integration tests and benches

`

``

81

`+

can use as a "scratchpad" for testing filesystem operations.

`

``

82

+

``

83

`+

Compatibility Notes

`

``

84

`+


`

``

85

`` +

``

``

86

`+

`

``

87

`+

could require different lifetimes.]85574

`

``

88

`` +

``

``

89

`+

than before and may reject some previously accepted code.

`

``

90

`` +

``

``

91

`` +

when compiled with codegen-units = 1.]86063

``

``

92

+

``

93

`+

`

``

94

`+

`

``

95

`+

`

``

96

`+

`

``

97

`+

`

``

98

`+

`

``

99

`+

`

``

100

`+

`

``

101

`+

`

``

102

`+

`

``

103

`+

`

``

104

`+

`

``

105

`+

`

``

106

`+

`

``

107

`+

`

``

108

`+

`

``

109

`+

`

``

110

`+

`

``

111

`+

`

``

112

`+

`

``

113

`` +

``

``

114

`` +

``

``

115

`` +

``

``

116

`` +

``

``

117

`` +

``

``

118

`` +

``

``

119

`` +

``

``

120

+

``

121

`` +

``

``

122

+

``

123

`` +

``

``

124

+

1

125

`Version 1.53.0 (2021-06-17)

`

2

126

`============================

`

3

127

``

`@@ -81,13 +205,6 @@ Stabilised APIs

`

81

205

`` - [Vec::extend_from_within]

``

82

206

`` - [array::from_mut]

``

83

207

`` - [array::from_ref]

``

84

``

`` -

``

85

``

`` -

``

86

``

`` -

``

87

``

`` -

``

88

``

`` -

``

89

``

`` -

``

90

``

`` -

``

91

208

`` - [cmp::max_by_key]

``

92

209

`` - [cmp::max_by]

``

93

210

`` - [cmp::min_by_key]

``

`@@ -120,6 +237,7 @@ Compatibility Notes

`

120

237

`` In particular, this was known to be a problem in the lexical-core crate,

``

121

238

` but they have published fixes for semantic versions 0.4 through 0.7. To

`

122

239

`` update this dependency alone, use cargo update -p lexical-core.

``

``

240

`` +

``

123

241

``

124

242

`Internal Only

`

125

243

`-------------

`

`@@ -156,13 +274,6 @@ related tools.

`

156

274

`[cargo/9298]: https://github.com/rust-lang/cargo/pull/9298

`

157

275

`[cargo/9282]: https://github.com/rust-lang/cargo/pull/9282

`

158

276

`[cargo/9392]: https://github.com/rust-lang/cargo/pull/9392

`

159

``

`` -

``

160

``

`` -

``

161

``

`` -

``

162

``

`` -

``

163

``

`` -

``

164

``

`` -

``

165

``

`` -

``

166

277

`` [AtomicBool::fetch_update]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicBool.html#method.fetch_update

``

167

278

`` [AtomicPtr::fetch_update]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicPtr.html#method.fetch_update

``

168

279

`` [BTreeMap::retain]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.retain

``

`@@ -324,6 +435,7 @@ Compatibility Notes

`

324

435

`` - [Rustc now catches more cases of pub_use_of_private_extern_crate][80763]

``

325

436

`- [Changes in how proc macros handle whitespace may lead to panics when used

`

326

437

`` with older proc-macro-hack versions. A cargo update should be sufficient to fix this in all cases.][84136]

``

``

438

`` +

``

327

439

``

328

440

`[84136]: https://github.com/rust-lang/rust/issues/84136

`

329

441

`[80763]: https://github.com/rust-lang/rust/pull/80763

`

`@@ -350,6 +462,7 @@ Compatibility Notes

`

350

462

`[78429]: https://github.com/rust-lang/rust/pull/78429

`

351

463

`[82733]: https://github.com/rust-lang/rust/pull/82733

`

352

464

`[82594]: https://github.com/rust-lang/rust/pull/82594

`

``

465

`+

`

353

466

`[cargo/9181]: https://github.com/rust-lang/cargo/pull/9181

`

354

467

`` char::MAX: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.MAX

``

355

468

`` char::REPLACEMENT_CHARACTER: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.REPLACEMENT_CHARACTER

``

`@@ -1760,6 +1873,7 @@ Language

`

1760

1873

`` - [You can now use #[repr(transparent)] on univariant enums.][68122] Meaning

``

1761

1874

` that you can create an enum that has the exact layout and ABI of the type

`

1762

1875

` it contains.

`

``

1876

`+

`

1763

1877

`- [There are some syntax-only changes:][67131]

`

1764

1878

`` - default is syntactically allowed before items in trait definitions.

``

1765

1879

`` - Items in impls (i.e. consts, types, and fns) may syntactically

``

`@@ -1821,6 +1935,7 @@ Compatibility Notes

`

1821

1935

`[67935]: https://github.com/rust-lang/rust/pull/67935/

`

1822

1936

`[68339]: https://github.com/rust-lang/rust/pull/68339/

`

1823

1937

`[68122]: https://github.com/rust-lang/rust/pull/68122/

`

``

1938

`+

`

1824

1939

`[67712]: https://github.com/rust-lang/rust/pull/67712/

`

1825

1940

`[67887]: https://github.com/rust-lang/rust/pull/67887/

`

1826

1941

`[67131]: https://github.com/rust-lang/rust/pull/67131/

`