Skip to content

[stable] Backport Clippy ICE fix to stable #77750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 57 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
ca26640
this is beta 1.47.0
pietroalbini Aug 25, 2020
0343877
releases: include last-minute compatibility notes for 1.46.0
pietroalbini Aug 24, 2020
0f91f5c
Auto merge of #75921 - pietroalbini:beta-next, r=Mark-Simulacrum
bors Aug 25, 2020
adc747e
Fix swapped stability attributes
jyn514 Aug 26, 2020
84b047b
Auto merge of #76032 - jyn514:lint-backport, r=Mark-Simulacrum
bors Aug 28, 2020
6922feb
[beta] Update cargo
ehuss Aug 31, 2020
aa30bf3
Auto merge of #76175 - ehuss:update-beta-cargo, r=Mark-Simulacrum
bors Sep 10, 2020
1778a1e
Restrict `same_item_push` to suppress false positives
giraffate Sep 7, 2020
0117ea2
Refactoring: use inner function
giraffate Sep 7, 2020
b80576f
Some refactoring
giraffate Sep 7, 2020
14faebe
Add some tests to `same_item_push`
giraffate Sep 8, 2020
2972ad3
Refactoring: tests in `same_item_push`
giraffate Sep 8, 2020
730ca45
Address `items_after_statement`
giraffate Sep 8, 2020
cbaf066
Add ui test for 74672 and 76571
tesuji Sep 11, 2020
5575420
Ignore rustc_private items from std docs
tesuji Sep 10, 2020
02fb8ae
Fix HashMap visualizers in Visual Studio (Code)
MaulingMonkey Sep 5, 2020
ed2eb80
Fix loading pretty-printers in rust-lldb script
artemmukhin Aug 28, 2020
169b83c
Account for version number in NtIdent hack
Aaron1011 Sep 4, 2020
94dc25b
Account for async functions when suggesting new named lifetime
estebank Aug 24, 2020
557e2bc
Bump to stable release
Mark-Simulacrum Sep 17, 2020
755064b
Auto merge of #76852 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
bors Sep 17, 2020
2e91e4d
Rebase LLVM onto 11.0.0-rc3
cuviper Sep 22, 2020
db5f6df
[mir-opt] Disable the `ConsideredEqual` logic in SimplifyBranchSame opt
wesleywiser Sep 17, 2020
bf812bd
revert const_type_id stabilization
KodrAus Sep 22, 2020
aac490a
update tracking issue for const_type_id
KodrAus Sep 23, 2020
656fa79
Rename Iterator::get_unchecked -> Iterator::__iterator_get_unchecked
Mark-Simulacrum Sep 28, 2020
9f0e6fa
Auto merge of #77308 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
bors Sep 29, 2020
d28211d
Fix rustup fallout
flip1995 Oct 1, 2020
4a91098
Merge commit 'd28211ddb6bec659acd523ef63966a5032a618b7' into beta
flip1995 Oct 1, 2020
e28d2bd
Auto merge of #77403 - flip1995:beta, r=pietroalbini
bors Oct 1, 2020
bdc9e15
Revert "Move macro test to ui/macros"
Mark-Simulacrum Oct 2, 2020
ab80426
Revert "Promote missing_fragment_specifier to hard error"
Mark-Simulacrum Oct 2, 2020
e846a86
Revert "Remove missing_fragment_specifier lint"
Mark-Simulacrum Oct 2, 2020
2b214e6
Revert "Remove broken clap versions from cargotest"
Mark-Simulacrum Oct 2, 2020
6d3dc31
Auto merge of #77456 - Mark-Simulacrum:revert-76605, r=pietroalbini
bors Oct 3, 2020
7c4c96c
Only visit types once when walking the type tree
VFLashM Sep 15, 2020
87022d0
Better handling for exponential-sized types in misc places
VFLashM Sep 15, 2020
507dd1d
Intorduced MiniMap - a tiny small storage optimized map implementation
VFLashM Sep 18, 2020
b0db534
Remove redundancy in cache key
tmandry Sep 18, 2020
7dca7cc
cache types during normalization
lcnr Sep 19, 2020
5b3a05a
ci: switch to environment files to change the environment on GHA
pietroalbini Oct 1, 2020
5c29a94
replacing sub's that can wrap by saturating_sub's
ad-anssi Sep 11, 2020
f3ab317
add non-regression test for issue #76597
ad-anssi Sep 11, 2020
bf38fa5
repairing broken error message and rustfix application for the new test
ad-anssi Sep 11, 2020
d6646f6
Auto merge of #77490 - Mark-Simulacrum:beta-backports, r=Mark-Simulacrum
bors Oct 3, 2020
9eb4039
Cherry-pick release notes from master
Mark-Simulacrum Oct 5, 2020
1240817
Fix miscompile in SimplifyBranchSame
simonvandel Oct 4, 2020
2d8cf77
Add regression test for SimplifyBranchSame miscompilation
tmiasko Oct 4, 2020
9435ba4
Instruct lld that our @ files are posix-style, not Windows
Mark-Simulacrum Oct 4, 2020
6602b46
Switch channel to stable for 1.47 release
Mark-Simulacrum Oct 5, 2020
274413c
Add note about as yet undiagnosed issues
Mark-Simulacrum Oct 5, 2020
90ed0a8
Auto merge of #77577 - Mark-Simulacrum:stable-next, r=pietroalbini
bors Oct 5, 2020
2de10f8
Disable ThinLTO for x86_64-unknown-linux-gnu
Mark-Simulacrum Oct 6, 2020
b4c560a
relnotes: remove compat note about linux hanging
pietroalbini Oct 7, 2020
18bf6b4
Auto merge of #77642 - pietroalbini:stable-next, r=pietroalbini
bors Oct 7, 2020
53169b6
Fix ICE in `repeat_once` lint
ebroto Aug 23, 2020
58bafb9
Merge commit '53169b6978be757a5f1f025fa763898bcca4d92d' into clippy_s…
flip1995 Oct 9, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
[submodule "src/llvm-project"]
path = src/llvm-project
url = https://github.com/rust-lang/llvm-project.git
branch = rustc/11.0-2020-08-20
branch = rustc/11.0-2020-09-22
[submodule "src/doc/embedded-book"]
path = src/doc/embedded-book
url = https://github.com/rust-embedded/book.git
Expand Down
3 changes: 3 additions & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3424,6 +3424,7 @@ dependencies = [
name = "rustc_data_structures"
version = "0.0.0"
dependencies = [
"arrayvec",
"bitflags",
"cfg-if",
"crossbeam-utils 0.7.2",
Expand Down Expand Up @@ -3599,6 +3600,7 @@ dependencies = [
name = "rustc_infer"
version = "0.0.0"
dependencies = [
"arrayvec",
"rustc_ast",
"rustc_data_structures",
"rustc_errors",
Expand Down Expand Up @@ -3738,6 +3740,7 @@ dependencies = [
name = "rustc_middle"
version = "0.0.0"
dependencies = [
"arrayvec",
"bitflags",
"byteorder",
"chalk-ir",
Expand Down
154 changes: 151 additions & 3 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,139 @@
Version 1.47.0 (2020-10-08)
==========================

Language
--------
- [Closures will now warn when not used.][74869]

Compiler
--------
- [Stabilized the `-C control-flow-guard` codegen option][73893], which enables
[Control Flow Guard][1.47.0-cfg] for Windows platforms, and is ignored on other
platforms.
- [Upgraded to LLVM 11.][73526]
- [Added tier 3\* support for the `thumbv4t-none-eabi` target.][74419]
- [Upgrade the FreeBSD toolchain to version 11.4][75204]
- [`RUST_BACKTRACE`'s output is now more compact.][75048]

\* Refer to Rust's [platform support page][forge-platform-support] for more
information on Rust's tiered platform support.

Libraries
---------
- [`CStr` now implements `Index<RangeFrom<usize>>`.][74021]
- [Traits in `std`/`core` are now implemented for arrays of any length, not just
those of length less than 33.][74060]
- [`ops::RangeFull` and `ops::Range` now implement Default.][73197]
- [`panic::Location` now implements `Copy`, `Clone`, `Eq`, `Hash`, `Ord`,
`PartialEq`, and `PartialOrd`.][73583]

Stabilized APIs
---------------
- [`Ident::new_raw`]
- [`Range::is_empty`]
- [`RangeInclusive::is_empty`]
- [`Result::as_deref`]
- [`Result::as_deref_mut`]
- [`Vec::leak`]
- [`pointer::offset_from`]
- [`f32::TAU`]
- [`f64::TAU`]

The following previously stable APIs have now been made const.

- [The `new` method for all `NonZero` integers.][73858]
- [The `checked_add`,`checked_sub`,`checked_mul`,`checked_neg`, `checked_shl`,
`checked_shr`, `saturating_add`, `saturating_sub`, and `saturating_mul`
methods for all integers.][73858]
- [The `checked_abs`, `saturating_abs`, `saturating_neg`, and `signum` for all
signed integers.][73858]
- [The `is_ascii_alphabetic`, `is_ascii_uppercase`, `is_ascii_lowercase`,
`is_ascii_alphanumeric`, `is_ascii_digit`, `is_ascii_hexdigit`,
`is_ascii_punctuation`, `is_ascii_graphic`, `is_ascii_whitespace`, and
`is_ascii_control` methods for `char` and `u8`.][73858]

Cargo
-----
- [`build-dependencies` are now built with opt-level 0 by default.][cargo/8500]
You can override this by setting the following in your `Cargo.toml`.
```toml
[profile.release.build-override]
opt-level = 3
```
- [`cargo-help` will now display man pages for commands rather just the
`--help` text.][cargo/8456]
- [`cargo-metadata` now emits a `test` field indicating if a target has
tests enabled.][cargo/8478]
- [`workspace.default-members` now respects `workspace.exclude`.][cargo/8485]
- [`cargo-publish` will now use an alternative registry by default if it's the
only registry specified in `package.publish`.][cargo/8571]

Misc
----
- [Added a help button beside Rustdoc's searchbar that explains rustdoc's
type based search.][75366]
- [Added the Ayu theme to rustdoc.][71237]

Compatibility Notes
-------------------
- [Bumped the minimum supported Emscripten version to 1.39.20.][75716]
- [Fixed a regression parsing `{} && false` in tail expressions.][74650]
- [Added changes to how proc-macros are expanded in `macro_rules!` that should
help to preserve more span information.][73084] These changes may cause
compiliation errors if your macro was unhygenic or didn't correctly handle
`Delimiter::None`.
- [Moved support for the CloudABI target to tier 3.][75568]
- [`linux-gnu` targets now require minimum kernel 2.6.32 and glibc 2.11.][74163]

Internal Only
--------
- [Improved default settings for bootstrapping in `x.py`.][73964] You can read details about this change in the ["Changes to `x.py` defaults"](https://blog.rust-lang.org/inside-rust/2020/08/30/changes-to-x-py-defaults.html) post on the Inside Rust blog.
- [Added the `rustc-docs` component.][75560] This allows you to install
and read the documentation for the compiler internal APIs. (Currently only
available for `x86_64-unknown-linux-gnu`.)

[1.47.0-cfg]: https://docs.microsoft.com/en-us/windows/win32/secbp/control-flow-guard
[76980]: https://github.com/rust-lang/rust/issues/76980
[75048]: https://github.com/rust-lang/rust/pull/75048/
[74163]: https://github.com/rust-lang/rust/pull/74163/
[71237]: https://github.com/rust-lang/rust/pull/71237/
[74869]: https://github.com/rust-lang/rust/pull/74869/
[73858]: https://github.com/rust-lang/rust/pull/73858/
[75716]: https://github.com/rust-lang/rust/pull/75716/
[75908]: https://github.com/rust-lang/rust/pull/75908/
[75516]: https://github.com/rust-lang/rust/pull/75516/
[75560]: https://github.com/rust-lang/rust/pull/75560/
[75568]: https://github.com/rust-lang/rust/pull/75568/
[75366]: https://github.com/rust-lang/rust/pull/75366/
[75204]: https://github.com/rust-lang/rust/pull/75204/
[74650]: https://github.com/rust-lang/rust/pull/74650/
[74419]: https://github.com/rust-lang/rust/pull/74419/
[73964]: https://github.com/rust-lang/rust/pull/73964/
[74021]: https://github.com/rust-lang/rust/pull/74021/
[74060]: https://github.com/rust-lang/rust/pull/74060/
[73893]: https://github.com/rust-lang/rust/pull/73893/
[73526]: https://github.com/rust-lang/rust/pull/73526/
[73583]: https://github.com/rust-lang/rust/pull/73583/
[73084]: https://github.com/rust-lang/rust/pull/73084/
[73197]: https://github.com/rust-lang/rust/pull/73197/
[72488]: https://github.com/rust-lang/rust/pull/72488/
[cargo/8456]: https://github.com/rust-lang/cargo/pull/8456/
[cargo/8478]: https://github.com/rust-lang/cargo/pull/8478/
[cargo/8485]: https://github.com/rust-lang/cargo/pull/8485/
[cargo/8500]: https://github.com/rust-lang/cargo/pull/8500/
[cargo/8571]: https://github.com/rust-lang/cargo/pull/8571/
[`Ident::new_raw`]: https://doc.rust-lang.org/nightly/proc_macro/struct.Ident.html#method.new_raw
[`Range::is_empty`]: https://doc.rust-lang.org/nightly/std/ops/struct.Range.html#method.is_empty
[`RangeInclusive::is_empty`]: https://doc.rust-lang.org/nightly/std/ops/struct.RangeInclusive.html#method.is_empty
[`Result::as_deref_mut`]: https://doc.rust-lang.org/nightly/std/result/enum.Result.html#method.as_deref_mut
[`Result::as_deref`]: https://doc.rust-lang.org/nightly/std/result/enum.Result.html#method.as_deref
[`TypeId::of`]: https://doc.rust-lang.org/nightly/std/any/struct.TypeId.html#method.of
[`Vec::leak`]: https://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.leak
[`f32::TAU`]: https://doc.rust-lang.org/nightly/std/f32/consts/constant.TAU.html
[`f64::TAU`]: https://doc.rust-lang.org/nightly/std/f64/consts/constant.TAU.html
[`pointer::offset_from`]: https://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.offset_from


Version 1.46.0 (2020-08-27)
==========================

Expand All @@ -10,7 +146,7 @@ Language
function's caller's location information for panic messages.][72445]
- [Recursively indexing into tuples no longer needs parentheses.][71322] E.g.
`x.0.0` over `(x.0).0`.
- [`mem::transmute` can now be used in static and constants.][72920] **Note**
- [`mem::transmute` can now be used in statics and constants.][72920] **Note**
You currently can't use `mem::transmute` in constant functions.

Compiler
Expand Down Expand Up @@ -51,7 +187,7 @@ Compatibility Notes
-------------------
- [The target configuration option `abi_blacklist` has been renamed
to `unsupported_abis`.][74150] The old name will still continue to work.
- [Rustc will now warn if you have a C-like enum that implements `Drop`.][72331]
- [Rustc will now warn if you cast a C-like enum that implements `Drop`.][72331]
This was previously accepted but will become a hard error in a future release.
- [Rustc will fail to compile if you have a struct with
`#[repr(i128)]` or `#[repr(u128)]`.][74109] This representation is currently only
Expand All @@ -68,7 +204,19 @@ Compatibility Notes
- [Rustc now correctly relates the lifetime of an existential associated
type.][71896] This fixes some edge cases where `rustc` would erroneously allow
you to pass a shorter lifetime than expected.

- [Rustc now dynamically links to `libz` (also called `zlib`) on Linux.][74420]
The library will need to be installed for `rustc` to work, even though we
expect it to be already available on most systems.
- [Tests annotated with `#[should_panic]` are broken on ARMv7 while running
under QEMU.][74820]
- [Pretty printing of some tokens in procedural macros changed.][75453] The
exact output returned by rustc's pretty printing is an unstable
implementation detail: we recommend any macro relying on it to switch to a
more robust parsing system.

[75453]: https://github.com/rust-lang/rust/issues/75453/
[74820]: https://github.com/rust-lang/rust/issues/74820/
[74420]: https://github.com/rust-lang/rust/issues/74420/
[74109]: https://github.com/rust-lang/rust/pull/74109/
[74150]: https://github.com/rust-lang/rust/pull/74150/
[73862]: https://github.com/rust-lang/rust/pull/73862/
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/any.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ impl TypeId {
/// assert_eq!(is_string(&"cookie monster".to_string()), true);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_type_id", since = "1.46.0")]
#[rustc_const_unstable(feature = "const_type_id", issue = "77125")]
pub const fn of<T: ?Sized + 'static>() -> TypeId {
TypeId { t: intrinsics::type_id::<T>() }
}
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ extern "rust-intrinsic" {
/// crate it is invoked in.
///
/// The stabilized version of this intrinsic is [`crate::any::TypeId::of`].
#[rustc_const_stable(feature = "const_type_id", since = "1.46.0")]
#[rustc_const_unstable(feature = "const_type_id", issue = "77125")]
pub fn type_id<T: ?Sized + 'static>() -> u64;

/// A guard for unsafe functions that cannot ever be executed if `T` is uninhabited:
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/iter/adapters/fuse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ where
}

#[inline]
unsafe fn get_unchecked(&mut self, idx: usize) -> Self::Item
unsafe fn __iterator_get_unchecked(&mut self, idx: usize) -> Self::Item
where
Self: TrustedRandomAccess,
{
Expand Down
8 changes: 4 additions & 4 deletions library/core/src/iter/adapters/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ where
self.it.count()
}

unsafe fn get_unchecked(&mut self, idx: usize) -> T
unsafe fn __iterator_get_unchecked(&mut self, idx: usize) -> T
where
Self: TrustedRandomAccess,
{
Expand Down Expand Up @@ -350,7 +350,7 @@ where
self.it.map(T::clone).fold(init, f)
}

unsafe fn get_unchecked(&mut self, idx: usize) -> T
unsafe fn __iterator_get_unchecked(&mut self, idx: usize) -> T
where
Self: TrustedRandomAccess,
{
Expand Down Expand Up @@ -865,7 +865,7 @@ where
self.iter.fold(init, map_fold(self.f, g))
}

unsafe fn get_unchecked(&mut self, idx: usize) -> B
unsafe fn __iterator_get_unchecked(&mut self, idx: usize) -> B
where
Self: TrustedRandomAccess,
{
Expand Down Expand Up @@ -1304,7 +1304,7 @@ where
self.iter.fold(init, enumerate(self.count, fold))
}

unsafe fn get_unchecked(&mut self, idx: usize) -> <Self as Iterator>::Item
unsafe fn __iterator_get_unchecked(&mut self, idx: usize) -> <Self as Iterator>::Item
where
Self: TrustedRandomAccess,
{
Expand Down
20 changes: 12 additions & 8 deletions library/core/src/iter/adapters/zip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ where
}

#[inline]
unsafe fn get_unchecked(&mut self, idx: usize) -> Self::Item
unsafe fn __iterator_get_unchecked(&mut self, idx: usize) -> Self::Item
where
Self: TrustedRandomAccess,
{
Expand Down Expand Up @@ -197,12 +197,14 @@ where
let i = self.index;
self.index += 1;
// SAFETY: `i` is smaller than `self.len`, thus smaller than `self.a.len()` and `self.b.len()`
unsafe { Some((self.a.get_unchecked(i), self.b.get_unchecked(i))) }
unsafe {
Some((self.a.__iterator_get_unchecked(i), self.b.__iterator_get_unchecked(i)))
}
} else if A::may_have_side_effect() && self.index < self.a.size() {
// match the base implementation's potential side effects
// SAFETY: we just checked that `self.index` < `self.a.len()`
unsafe {
self.a.get_unchecked(self.index);
self.a.__iterator_get_unchecked(self.index);
}
self.index += 1;
None
Expand All @@ -229,13 +231,13 @@ where
// ensures that `end` is smaller than or equal to `self.len`,
// so `i` is also smaller than `self.len`.
unsafe {
self.a.get_unchecked(i);
self.a.__iterator_get_unchecked(i);
}
}
if B::may_have_side_effect() {
// SAFETY: same as above.
unsafe {
self.b.get_unchecked(i);
self.b.__iterator_get_unchecked(i);
}
}
}
Expand Down Expand Up @@ -277,7 +279,9 @@ where
let i = self.len;
// SAFETY: `i` is smaller than the previous value of `self.len`,
// which is also smaller than or equal to `self.a.len()` and `self.b.len()`
unsafe { Some((self.a.get_unchecked(i), self.b.get_unchecked(i))) }
unsafe {
Some((self.a.__iterator_get_unchecked(i), self.b.__iterator_get_unchecked(i)))
}
} else {
None
}
Expand All @@ -287,7 +291,7 @@ where
unsafe fn get_unchecked(&mut self, idx: usize) -> <Self as Iterator>::Item {
// SAFETY: the caller must uphold the contract for
// `Iterator::get_unchecked`.
unsafe { (self.a.get_unchecked(idx), self.b.get_unchecked(idx)) }
unsafe { (self.a.__iterator_get_unchecked(idx), self.b.__iterator_get_unchecked(idx)) }
}
}

Expand Down Expand Up @@ -430,6 +434,6 @@ unsafe impl<I: Iterator + TrustedRandomAccess> SpecTrustedRandomAccess for I {
unsafe fn try_get_unchecked(&mut self, index: usize) -> Self::Item {
// SAFETY: the caller must uphold the contract for
// `Iterator::get_unchecked`.
unsafe { self.get_unchecked(index) }
unsafe { self.__iterator_get_unchecked(index) }
}
}
2 changes: 1 addition & 1 deletion library/core/src/iter/traits/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3251,7 +3251,7 @@ pub trait Iterator {
#[inline]
#[doc(hidden)]
#[unstable(feature = "trusted_random_access", issue = "none")]
unsafe fn get_unchecked(&mut self, _idx: usize) -> Self::Item
unsafe fn __iterator_get_unchecked(&mut self, _idx: usize) -> Self::Item
where
Self: TrustedRandomAccess,
{
Expand Down
1 change: 1 addition & 0 deletions library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
#![feature(const_slice_ptr_len)]
#![feature(const_size_of_val)]
#![feature(const_align_of_val)]
#![feature(const_type_id)]
#![feature(const_type_name)]
#![feature(const_likely)]
#![feature(const_unreachable_unchecked)]
Expand Down
Loading