]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agoRollup merge of #93592 - est31:remove_unused_deps, r=bjorn3
Matthias Krüger [Wed, 2 Feb 2022 18:34:08 +0000 (19:34 +0100)]
Rollup merge of #93592 - est31:remove_unused_deps, r=bjorn3

Remove unused dep from rustc_arena

2 years agoRollup merge of #93590 - est31:let_else, r=lcnr
Matthias Krüger [Wed, 2 Feb 2022 18:34:07 +0000 (19:34 +0100)]
Rollup merge of #93590 - est31:let_else, r=lcnr

More let_else adoptions

Continuation of #89933, #91018, #91481, #93046.

2 years agoRollup merge of #93574 - compiler-errors:bad-let-suggestion, r=lcnr
Matthias Krüger [Wed, 2 Feb 2022 18:34:06 +0000 (19:34 +0100)]
Rollup merge of #93574 - compiler-errors:bad-let-suggestion, r=lcnr

don't suggest adding `let` due to bad assignment expressions inside of `while` loop

adds a check that our `lhs` expression is actually within the conditional part of the `while` loop, instead of anywhere in the `while` body.

fixes #93486

2 years agoRollup merge of #93571 - compiler-errors:better-where-suggestion, r=lcnr
Matthias Krüger [Wed, 2 Feb 2022 18:34:05 +0000 (19:34 +0100)]
Rollup merge of #93571 - compiler-errors:better-where-suggestion, r=lcnr

better suggestion for duplicated `where` clause

fixes #93567

2 years agoRollup merge of #93546 - tmiasko:validate-switch-int, r=oli-obk
Matthias Krüger [Wed, 2 Feb 2022 18:34:04 +0000 (19:34 +0100)]
Rollup merge of #93546 - tmiasko:validate-switch-int, r=oli-obk

Validate that values in switch int terminator are unique

2 years agoRollup merge of #93542 - GuillaumeGomez:lifetime-elision, r=oli-obk
Matthias Krüger [Wed, 2 Feb 2022 18:34:03 +0000 (19:34 +0100)]
Rollup merge of #93542 - GuillaumeGomez:lifetime-elision, r=oli-obk

Prevent lifetime elision in type alias

Fixes #93401.

Apparently, the problem has been fixed in the compiler.

r? `@oli-obk`

2 years agoRollup merge of #93221 - alyssaverkade:fix-93093, r=wesleywiser
Matthias Krüger [Wed, 2 Feb 2022 18:34:02 +0000 (19:34 +0100)]
Rollup merge of #93221 - alyssaverkade:fix-93093, r=wesleywiser

[borrowck] Fix help on mutating &self in async fns

Previously, when rustc was provided an async function that tried to
mutate through a shared reference to an implicit self (as shown in the
ui test), rustc would suggest modifying the parameter signature
to `&mut` + the fully qualified name of the ty (in the case of the repro
`S`). If a user modified their code to match the suggestion, the
compiler would not accept it.

This commit modifies the suggestion so that when rustc is provided the
ui test that is also attached in this commit, it suggests (correctly)
`&mut self`. We try to be careful about distinguishing between implicit
and explicit self annotations, since the latter seem to be handled
correctly already.

This is my first PR here so I'm pretty sure I probably missed something/could use better terminology. I also didn't try to make the match exhaustive since implicit self is the only real special case that I need to handle (that I'm aware of), and I'm pretty sure there's a cleaner way to do this so any advice would be greatly appreciated! (I'm also not terribly confident about how I wrote the ui tests)

here is your cc as requested `@compiler-errors`

This is an attempt to fix #93093

2 years agoRollup merge of #92528 - tmiasko:combine-commutative, r=michaelwoerister
Matthias Krüger [Wed, 2 Feb 2022 18:34:01 +0000 (19:34 +0100)]
Rollup merge of #92528 - tmiasko:combine-commutative, r=michaelwoerister

Make `Fingerprint::combine_commutative` associative

The previous implementation swapped lower and upper 64-bits of a result
of modular addition, so the function was non-associative.

r? `@Aaron1011`

2 years agoRemove unused dep from rustc_arena
est31 [Wed, 2 Feb 2022 16:37:14 +0000 (17:37 +0100)]
Remove unused dep from rustc_arena

2 years agoMore let_else adoptions
est31 [Wed, 2 Feb 2022 11:45:20 +0000 (12:45 +0100)]
More let_else adoptions

2 years agoAuto merge of #93312 - pierwill:map-all-local-trait-impls, r=cjgillot
bors [Wed, 2 Feb 2022 15:36:12 +0000 (15:36 +0000)]
Auto merge of #93312 - pierwill:map-all-local-trait-impls, r=cjgillot

Return an indexmap in `all_local_trait_impls` query

The data structure previously used here required that `DefId` be `Ord`. As part of #90317, we do not want `DefId` to implement `Ord`.

2 years agoUse Option::then in two places
est31 [Wed, 2 Feb 2022 15:08:05 +0000 (16:08 +0100)]
Use Option::then in two places

2 years agoadd tests
tamaron [Wed, 2 Feb 2022 14:07:02 +0000 (23:07 +0900)]
add tests

2 years agoAuto merge of #93154 - michaelwoerister:fix-generic-closure-and-generator-debuginfo...
bors [Wed, 2 Feb 2022 12:37:28 +0000 (12:37 +0000)]
Auto merge of #93154 - michaelwoerister:fix-generic-closure-and-generator-debuginfo, r=wesleywiser

debuginfo: Make sure that type names for closure and generator environments are unique in debuginfo.

Before this change, closure/generator environments coming from different instantiations of the same generic function were all assigned the same name even though they were distinct types with potentially different data layout. Now we append the generic arguments of the originating function to the type name.

This commit also emits `{closure_env#0}` as the name of these types in order to disambiguate them from the accompanying closure function (which keeps being called `{closure#0}`). Previously both were assigned the same name.

NOTE: Changing debuginfo names like this can break pretty printers and other debugger plugins. I think it's OK in this particular case because the names we are changing were ambiguous anyway. In general though it would be great to have a process for doing changes like these.

2 years agoAuto merge of #93573 - matthiaskrgr:rollup-nrjmygz, r=matthiaskrgr
bors [Wed, 2 Feb 2022 09:39:18 +0000 (09:39 +0000)]
Auto merge of #93573 - matthiaskrgr:rollup-nrjmygz, r=matthiaskrgr

Rollup of 7 pull requests

Successful merges:

 - #92758 (librustdoc: impl core::fmt::Write for rustdoc::html::render::Buffer)
 - #92788 (Detect `::` -> `:` typo in type argument)
 - #93420 (Improve wrapping on settings page)
 - #93493 (Document valid values of the char type)
 - #93531 (Fix incorrect panic message in example)
 - #93559 (Add missing | between print options)
 - #93560 (Fix two incorrect "it's" (typos in comments))

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

2 years agobetter suggestion for duplicated `where`
Michael Goulet [Wed, 2 Feb 2022 05:44:44 +0000 (21:44 -0800)]
better suggestion for duplicated `where`

2 years agoEmit valid HTML from rustdoc
Jacob Hoffman-Andrews [Wed, 2 Feb 2022 06:11:36 +0000 (22:11 -0800)]
Emit valid HTML from rustdoc

Previously, tidy-html5 (`tidy`) would complain about a few things in our
HTML. The main thing is that `<summary>` tags can't contain `<div>`s.
That's easily fixed by changing out the `<div>`s for `<span>`s with
`display: block`.

However, there's also a rule that `<span>`s can't contain heading
elements. `<span>` permits only "phrasing content"
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span, and
`<h3>` (and friends) are "Flow content, heading content, palpable
content".
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements

We have a wrapping `<div>` that goes around each `<h3>`/`<h4>`,
etc. We turn that into a `<section>` rather than a `<span>` because
`<section>` permits "flow content".
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/section

After this change we get only three warnings from tidy, run on
struct.String.html:

line 6 column 10790 - Warning: trimming empty <span>
line 1 column 1118 - Warning: <link> proprietary attribute "disabled"
line 1 column 1193 - Warning: <link> proprietary attribute "disabled"

The empty `<span>` is a known issue - there's a span in front of the
search box to work around a strange Safari issue.

The `<link>` attributes are the non-default stylesheets. We can probably
refactor theme application to avoid using this proprietary "disabled"
attribute.

2 years agodon't suggest adding `let` due to expressions inside of `while` loop
Michael Goulet [Wed, 2 Feb 2022 07:27:04 +0000 (23:27 -0800)]
don't suggest adding `let` due to expressions inside of `while` loop

2 years agoRollup merge of #93560 - steffahn:a_typo, r=petrochenkov
Matthias Krüger [Wed, 2 Feb 2022 06:11:09 +0000 (07:11 +0100)]
Rollup merge of #93560 - steffahn:a_typo, r=petrochenkov

Fix two incorrect "it's" (typos in comments)

Found one of these while reading the documentation online. The other came up because it's in the same file.

2 years agoRollup merge of #93559 - danielframpton:link-args-typo, r=oli-obk
Matthias Krüger [Wed, 2 Feb 2022 06:11:08 +0000 (07:11 +0100)]
Rollup merge of #93559 - danielframpton:link-args-typo, r=oli-obk

Add missing | between print options

The help text for the newly stabilized print option is missing a | between stack-protector-strategies and link-args.

2 years agoRollup merge of #93531 - TheColdVoid:patch-1, r=m-ou-se
Matthias Krüger [Wed, 2 Feb 2022 06:11:07 +0000 (07:11 +0100)]
Rollup merge of #93531 - TheColdVoid:patch-1, r=m-ou-se

Fix incorrect panic message in example

The panic message when calling the `connect()` should probably be a  message about connection failure, not a message about binding address failure.

2 years agoRollup merge of #93493 - GKFX:char-docs-2, r=scottmcm
Matthias Krüger [Wed, 2 Feb 2022 06:11:07 +0000 (07:11 +0100)]
Rollup merge of #93493 - GKFX:char-docs-2, r=scottmcm

Document valid values of the char type

As discussed at #93392, the current documentation on what constitutes a valid char isn't very detailed and is partly on the MAX constant rather than the type itself.

This PR expands on that information, stating the actual numerical range, giving examples of what won't work, and also mentions how a `char` might be a valid USV but still not be a defined character (terminology checked against [Unicode 14.0, table 2-3](https://www.unicode.org/versions/Unicode14.0.0/ch02.pdf#M9.61673.TableTitle.Table.22.Types.of.Code.Points)).

2 years agoRollup merge of #93420 - jsha:adjust-settings-layout, r=GuillaumeGomez
Matthias Krüger [Wed, 2 Feb 2022 06:11:06 +0000 (07:11 +0100)]
Rollup merge of #93420 - jsha:adjust-settings-layout, r=GuillaumeGomez

Improve wrapping on settings page

Previously, the radio button choices for themes would wrap awkwardly on
narrow screens. With this change, the group of choices will prefer
bumping down to the next line together, leaving the setting name on its
own line.

Also fix some minor spacing issues:

 - Align the setting name vertically with the radio button choices.
 - Use margin instead of padding for most spacing choices.
 - Use no margin/padding on the right-hand side.

 Demo: https://rustdoc.crud.net/jsha/adjust-settings-layout/settings.html

 r? ``@GuillaumeGomez``

Before (narrow screen):

![image](https://user-images.githubusercontent.com/220205/151555533-7ab65216-d178-4dcc-8792-3c8fb9da8718.png)

After (narrow screen):

![image](https://user-images.githubusercontent.com/220205/151555702-ad79af32-f84b-4ee4-ae7a-1a2a463c0f6f.png)

2 years agoRollup merge of #92788 - estebank:colon-colon, r=cjgillot
Matthias Krüger [Wed, 2 Feb 2022 06:11:05 +0000 (07:11 +0100)]
Rollup merge of #92788 - estebank:colon-colon, r=cjgillot

Detect `::` -> `:` typo in type argument

When writing `Vec<A:B>`, suggest `Vec<A::B>`.

2 years agoRollup merge of #92758 - mfrw:mfrw/rustdoc-impl-write, r=GuillaumeGomez
Matthias Krüger [Wed, 2 Feb 2022 06:11:04 +0000 (07:11 +0100)]
Rollup merge of #92758 - mfrw:mfrw/rustdoc-impl-write, r=GuillaumeGomez

librustdoc: impl core::fmt::Write for rustdoc::html::render::Buffer

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Fixes: #92563
2 years agoMake rustc use `RUST_BACKTRACE=full` by default
Aaron Hill [Wed, 2 Feb 2022 00:27:16 +0000 (19:27 -0500)]
Make rustc use `RUST_BACKTRACE=full` by default

Compiler panics should be rare - when they do occur, we want the report
filed by the user to contain as much information as possible. This is
especially important when the panic is due to an incremental compilation
bug, since we may not have enough information to reproduce it.

This PR sets `RUST_BACKTRACE=full` inside `rustc` if the user has not
explicitly set `RUST_BACKTRACE`. This is more verbose than
`RUST_BACKTRACE=1`, but this may make it easier to debug incremental
compilation issues. Users who find this too verbose can still manually
set `RUST_BACKTRACE` before invoking the compiler.

This only affects `rustc` (and any tool using `rustc_driver::install_ice_hook`).
It does *not* affect any user crates or the standard library -
backtraces will continue to be off by default in any application
*compiled* by rustc.

2 years agoAuto merge of #93466 - cjgillot:query-dead, r=nagisa
bors [Wed, 2 Feb 2022 02:29:32 +0000 (02:29 +0000)]
Auto merge of #93466 - cjgillot:query-dead, r=nagisa

Make dead code check a query.

Dead code check is run for each invocation of the compiler, even if no modifications were involved.
This PR makes dead code check a query keyed on the module. This allows to skip the check when a module has not changed.
To perform this, a query `live_symbols_and_ignored_derived_traits` is introduced to encapsulate the global analysis of finding live symbols. The second query `check_mod_deathness` outputs diagnostics for each module based on this first query's results.

2 years agoMake `SearchPathFile::file_name_str` non-optional.
Nicholas Nethercote [Wed, 2 Feb 2022 02:16:25 +0000 (13:16 +1100)]
Make `SearchPathFile::file_name_str` non-optional.

Currently, it can be `None` if the conversion from `OsString` fails, in
which case all searches will skip over the `SearchPathFile`.

The commit changes things so that the `SearchPathFile` just doesn't get
created in the first place. Same behaviour, but slightly simpler code.

2 years agoDetect `::` -> `:` typo in type argument
Esteban Kuber [Tue, 11 Jan 2022 21:56:10 +0000 (21:56 +0000)]
Detect `::` -> `:` typo in type argument

When writing `Vec<A:B>`, suggest `Vec<A::B>`.

2 years agoAuto merge of #93285 - JulianKnodt:const_eq_2, r=oli-obk
bors [Tue, 1 Feb 2022 23:18:01 +0000 (23:18 +0000)]
Auto merge of #93285 - JulianKnodt:const_eq_2, r=oli-obk

Continue work on associated const equality

This actually implements some more complex logic for assigning associated consts to values.
Inside of projection candidates, it now defers to a separate function for either consts or
types. To reduce amount of code, projections are now generic over T, where T is either a Type or
a Const. I can add some comments back later, but this was the fastest way to implement it.

It also now finds the correct type of consts in type_of.

---

The current main TODO is finding the const of the def id for the LeafDef.

Right now it works if the function isn't called, but once you use the trait impl with the bound it fails inside projection.
I was hoping to get some help in getting the `&'tcx ty::Const<'tcx>`, in addition to a bunch of other `todo!()`s which I think may not be hit.

r? `@oli-obk`

Updates #92827

2 years agoInline and remove `FileSearch::search`.
Nicholas Nethercote [Tue, 1 Feb 2022 05:32:13 +0000 (16:32 +1100)]
Inline and remove `FileSearch::search`.

It has only a single callsite, and having all the code in one place will
make it possible to optimize the search.

2 years agoRemove `FileMatch`.
Nicholas Nethercote [Tue, 1 Feb 2022 05:24:48 +0000 (16:24 +1100)]
Remove `FileMatch`.

It's returned from `FileSearch::search` but it's only used to print some
debug info.

2 years agoRemove rlib special-casing in `FileSearch::search`.
Nicholas Nethercote [Tue, 1 Feb 2022 05:18:39 +0000 (16:18 +1100)]
Remove rlib special-casing in `FileSearch::search`.

This code and comment appear to be out of date.
`CrateLocator::find_library_crate` is the only caller of this function
and it handles rlib vs dylib overlap itself (see
`CrateLocator::extract_lib`) after inspecting all the files present, so
it doesn't need to see them in any particular order.

2 years agoFix annotation of code blocks
George Bateman [Tue, 1 Feb 2022 21:44:53 +0000 (21:44 +0000)]
Fix annotation of code blocks

2 years agoFix two incorrect "it's"
Frank Steffahn [Tue, 1 Feb 2022 21:32:02 +0000 (22:32 +0100)]
Fix two incorrect "it's"

2 years agoRemove "up here" arrow on item-infos
Jacob Hoffman-Andrews [Fri, 7 Jan 2022 17:39:56 +0000 (12:39 -0500)]
Remove "up here" arrow on item-infos

Use spacing to distinguish what is related to a given heading.

2 years agoAdd missing | between print options
Daniel Frampton [Tue, 1 Feb 2022 20:40:01 +0000 (12:40 -0800)]
Add missing | between print options

2 years agoFix w/ comments
kadmin [Tue, 1 Feb 2022 15:28:31 +0000 (15:28 +0000)]
Fix w/ comments

2 years agoAuto merge of #93442 - yaahc:Termination-abstraction, r=Mark-Simulacrum
bors [Tue, 1 Feb 2022 20:05:46 +0000 (20:05 +0000)]
Auto merge of #93442 - yaahc:Termination-abstraction, r=Mark-Simulacrum

Change Termination::report return type to ExitCode

Related to https://github.com/rust-lang/rust/issues/43301

The goal of this change is to minimize the forward compatibility risks in stabilizing Termination. By using the opaque type `ExitCode` instead of an `i32` we leave room for us to evolve the API over time to provide what cross-platform consistency we can / minimize footguns when working with exit codes, where as stabilizing on `i32` would limit what changes we could make in the future in how we represent and construct exit codes.

2 years agoLink `try_exists` docs to `Path::exists`
Chris Denton [Tue, 1 Feb 2022 17:47:19 +0000 (17:47 +0000)]
Link `try_exists` docs to `Path::exists`

2 years agoAuto merge of #93548 - matthiaskrgr:rollup-f7dkn3p, r=matthiaskrgr
bors [Tue, 1 Feb 2022 16:55:43 +0000 (16:55 +0000)]
Auto merge of #93548 - matthiaskrgr:rollup-f7dkn3p, r=matthiaskrgr

Rollup of 7 pull requests

Successful merges:

 - #86374 (Enable combining `+crt-static` and `relocation-model=pic` on `x86_64-unknown-linux-gnu`)
 - #91828 (Implement `RawWaker` and `Waker` getters for underlying pointers)
 - #92021 (Eliminate duplicate codes of is_single_fp_element)
 - #92584 (add rustc lint, warning when iterating over hashmaps 2)
 - #93267 (implement a lint for suspicious auto trait impls)
 - #93290 (remove `TyS::same_type`)
 - #93436 (Update compiler_builtins to fix duplicate symbols in `armv7-linux-androideabi` rlib)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

2 years agoAdd package.json in gitignore
Guillaume Gomez [Tue, 1 Feb 2022 16:14:59 +0000 (17:14 +0100)]
Add package.json in gitignore

2 years agoAdd rustdoc info to jsondocck output
Rune Tynan [Mon, 31 Jan 2022 15:38:15 +0000 (10:38 -0500)]
Add rustdoc info to jsondocck output

2 years agoRollup merge of #93436 - dcsommer:master, r=Mark-Simulacrum
Matthias Krüger [Tue, 1 Feb 2022 15:08:06 +0000 (16:08 +0100)]
Rollup merge of #93436 - dcsommer:master, r=Mark-Simulacrum

Update compiler_builtins to fix duplicate symbols in `armv7-linux-androideabi` rlib

I ran `./x.py dist --host= --target=armv7-linux-androideabi` before this diff:
```
$ nm build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/armv7-linux-androideabi/lib/libcompiler_builtins-3d9661a82c59c66a.rlib 2> /dev/null | grep __sync_fetch_and_add_4 | wc -l
2
```
And after:
```
$ nm build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/armv7-linux-androideabi/lib/libcompiler_builtins-ffd2745070943321.rlib 2> /dev/null | grep __sync_fetch_and_add_4 | wc -l
1
```
Fixes #93310

See also https://github.com/rust-lang/compiler-builtins/issues/449 and https://github.com/rust-lang/compiler-builtins/pull/450

2 years agoRollup merge of #93290 - lcnr:same_type, r=jackh726
Matthias Krüger [Tue, 1 Feb 2022 15:08:05 +0000 (16:08 +0100)]
Rollup merge of #93290 - lcnr:same_type, r=jackh726

remove `TyS::same_type`

This function ignored regions and constants in adts, but didn't do so for references or any other types. cc https://github.com/rust-lang/rust/pull/93148#discussion_r791408057

2 years agoRollup merge of #93267 - lcnr:auto-trait-lint, r=nikomatsakis
Matthias Krüger [Tue, 1 Feb 2022 15:08:04 +0000 (16:08 +0100)]
Rollup merge of #93267 - lcnr:auto-trait-lint, r=nikomatsakis

implement a lint for suspicious auto trait impls

cc https://github.com/rust-lang/rust/pull/85048#issuecomment-1019805102

r? ``@nikomatsakis``

2 years agoRollup merge of #92584 - lcnr:query-stable-lint, r=estebank
Matthias Krüger [Tue, 1 Feb 2022 15:08:03 +0000 (16:08 +0100)]
Rollup merge of #92584 - lcnr:query-stable-lint, r=estebank

add rustc lint, warning when iterating over hashmaps 2

first introduced in #89558 and reverted in #90380 due to its perf impact

r? ``@estebank``

2 years agoRollup merge of #92021 - woodenarrow:br_single_fp_element, r=Mark-Simulacrum
Matthias Krüger [Tue, 1 Feb 2022 15:08:03 +0000 (16:08 +0100)]
Rollup merge of #92021 - woodenarrow:br_single_fp_element, r=Mark-Simulacrum

Eliminate duplicate codes of is_single_fp_element

There are duplicate codes of is_single_fp_element function. Merge these codes to TyAndLayout impl block.
![image](https://user-images.githubusercontent.com/95843988/146707753-ba9ffc41-5888-4a53-80cf-f4fe3bcbac54.png)

2 years agoRollup merge of #91828 - oxalica:feat/waker-getters, r=dtolnay
Matthias Krüger [Tue, 1 Feb 2022 15:08:02 +0000 (16:08 +0100)]
Rollup merge of #91828 - oxalica:feat/waker-getters, r=dtolnay

Implement `RawWaker` and `Waker` getters for underlying pointers

implement #87021

New APIs:
- `RawWaker::data(&self) -> *const ()`
- `RawWaker::vtable(&self) -> &'static RawWakerVTable`
- ~`Waker::as_raw_waker(&self) -> &RawWaker`~ `Waker::as_raw(&self) -> &RawWaker`

This third one is an auxiliary function to make the two APIs above more useful. Since we can only get `&Waker` in `Future::poll`, without this, we need to `transmute` it into `&RawWaker` (relying on `repr(transparent)`) in order to access its data/vtable pointers.

~Not sure if it should be named `as_raw` or `as_raw_waker`. Seems we always use `as_<something-raw>` instead of just `as_raw`. But `as_raw_waker` seems not quite consistent with `Waker::from_raw`.~ As suggested in https://github.com/rust-lang/rust/pull/91828#discussion_r770729837, use `as_raw`.

2 years agoRollup merge of #86374 - bossmc:enable-static-pie-for-gnu, r=nagisa
Matthias Krüger [Tue, 1 Feb 2022 15:08:01 +0000 (16:08 +0100)]
Rollup merge of #86374 - bossmc:enable-static-pie-for-gnu, r=nagisa

Enable combining `+crt-static` and `relocation-model=pic` on `x86_64-unknown-linux-gnu`

Modern `gcc` versions support `-static-pie`, and `rustc` will already fall-back to `-static` if the local `gcc` is too old (and hence this change is optimistic rather than absolute).  This brings the `-musl` and `-gnu` targets to feature compatibility (albeit with different default settings).

Of note a `-static` or `-static-pie` binary based on glibc that uses NSS-backed functions (`gethostbyname` or `getpwuid` etc.) need to have access to the `libnss_X.so.2` libraries and any of their dynamic dependencies.

I wasn't sure about the `# only`/`# ignore` changes (I've not got a `gnux32` toolchain to test with hence not also enabling `-static-pie` there).

2 years agoAuto merge of #93284 - eholk:disable-drop-range-analysis, r=pnkfelix
bors [Tue, 1 Feb 2022 13:45:38 +0000 (13:45 +0000)]
Auto merge of #93284 - eholk:disable-drop-range-analysis, r=pnkfelix

Disable drop range analysis

The previous PR, #93165, still performed the drop range analysis despite ignoring the results. Unfortunately, there were ICEs in the analysis as well, so some packages failed to build (see the issue #93197 for an example). This change further disables the analysis and just provides dummy results in that case.

2 years agolibrustdoc: render: use render_into instead of creating a temp string
Muhammad Falak R Wani [Tue, 1 Feb 2022 12:36:58 +0000 (18:06 +0530)]
librustdoc: render: use render_into instead of creating a temp string

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
2 years agolibrustdoc: inline and forward all methods for `impl Write for Buffer`
Muhammad Falak R Wani [Tue, 11 Jan 2022 13:58:11 +0000 (19:28 +0530)]
librustdoc: inline and forward all methods for `impl Write for Buffer`

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
2 years agolibrustdoc: impl core::fmt::Write for rustdoc::html::render::Buffer
Muhammad Falak R Wani [Tue, 11 Jan 2022 07:39:05 +0000 (13:09 +0530)]
librustdoc: impl core::fmt::Write for rustdoc::html::render::Buffer

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
2 years agoMake dead code check a query.
Camille GILLOT [Sat, 29 Jan 2022 20:10:41 +0000 (21:10 +0100)]
Make dead code check a query.

2 years agoAdd test to ensure lifetime is not elided in type alias
Guillaume Gomez [Tue, 1 Feb 2022 11:29:46 +0000 (12:29 +0100)]
Add test to ensure lifetime is not elided in type alias

2 years agoFix lifetime elision in type aliases
Guillaume Gomez [Tue, 1 Feb 2022 11:29:22 +0000 (12:29 +0100)]
Fix lifetime elision in type aliases

2 years agoremove `TyS::same_type`
lcnr [Tue, 25 Jan 2022 07:42:52 +0000 (08:42 +0100)]
remove `TyS::same_type`

it ignored regions and constants in adts,
but didn't do so for references or any other types.
This seemed quite weird

2 years agoAuto merge of #86988 - thomcc:chunky-splitz-says-no-checking, r=the8472
bors [Tue, 1 Feb 2022 10:11:59 +0000 (10:11 +0000)]
Auto merge of #86988 - thomcc:chunky-splitz-says-no-checking, r=the8472

Carefully remove bounds checks from some chunk iterator functions

So, I was writing code that requires the equivalent of `rchunks(N).rev()` (which isn't the same as forward `chunks(N)` — in particular, if the buffer length is not a multiple of `N`, I must handle the "remainder" first).

I happened to look at the codegen output of the function (I was actually interested in whether or not a nested loop was being unrolled — it was), and noticed that in the outer `rchunks(n).rev()` loop, LLVM seemed to be unable to remove the bounds checks from the iteration: https://rust.godbolt.org/z/Tnz4MYY8f (this panic was from the split_at in `RChunks::next_back`).

After doing some experimentation, it seems all of the `next_back` in the non-exact chunk iterators have the issue: (`Chunks::next_back`, `RChunks::next_back`, `ChunksMut::next_back`, and `RChunksMut::next_back`)...

Even worse, the forward `rchunks` iterators sometimes have the issue as well (... but only sometimes). For example https://rust.godbolt.org/z/oGhbqv53r has bounds checks, but if I uncomment the loop body, it manages to remove the check (which is bizarre, since I'd expect the opposite...). I suspect it's highly dependent on the surrounding code, so I decided to remove the bounds checks from them anyway. Overall, this change includes:
- All `next_back` functions on the non-`Exact` iterators (e.g. `R?Chunks(Mut)?`).
- All `next` functions on the non-exact rchunks iterators (e.g. `RChunks(Mut)?`).

I wasn't able to catch any of the other chunk iterators failing to remove the bounds checks (I checked iterations over `r?chunks(_exact)?(_mut)?` with constant chunk sizes under `-O3`, `-Os`, and `-Oz`), which makes sense, since these were the cases where it was harder to prove the bounds check correct to remove...

In fact, it took quite a bit of thinking to convince myself that using unchecked_ here was valid — so I'm not really surprised that LLVM had trouble (although compilers are slightly better at this sort of reasoning than humans). A consequence of that is the fact that the `// SAFETY` comment for these are... kinda long...

---

I didn't do this for, or even think about it for, any of the other iteration methods; just `next` and `next_back` (where it mattered). If this PR is accepted, I'll file a follow up for someone (possibly me) to look at the others later (in particular, `nth`/`nth_back` looked like they had similar logic), but I wanted to do this now, as IMO `next`/`next_back` are the most important here, since they're what gets used by the iteration protocol.

---

Note: While I don't expect this to impact performance directly, the panic is a side effect, which would otherwise not exist in these loops. That is, this could prevent the compiler from being able to move/remove/otherwise rework a loop over these iterators (as an example, it could not delete the code for a loop whose body computes a value which doesn't get used).

Also, some like to be able to have confidence this code has no panicking branches in the optimized code, and "no bounds checks" is kinda part of the selling point of Rust's iterators anyway.

2 years agofix for the issue #92464
ouz-a [Sat, 15 Jan 2022 12:03:38 +0000 (15:03 +0300)]
fix for the issue #92464

2 years agodebuginfo: Make sure that type names for closure and generator environments are uniqu...
Michael Woerister [Wed, 19 Jan 2022 16:56:53 +0000 (17:56 +0100)]
debuginfo: Make sure that type names for closure and generator environments are unique in debuginfo.

Before this change, closure/generator environments coming from different
instantiations of the same generic function were all assigned the same
name even though they were distinct types with potentially different data
layout. Now we append the generic arguments of the originating function
to the type name.

This commit also emits '{closure_env#0}' as the name of these types in
order to disambiguate them from the accompanying closure function
'{closure#0}'. Previously both were assigned the same name.

2 years agoreview + rebase
lcnr [Tue, 1 Feb 2022 09:29:36 +0000 (10:29 +0100)]
review + rebase

2 years agorustfmt is broken, manually reduce line length
lcnr [Wed, 19 Jan 2022 10:22:40 +0000 (11:22 +0100)]
rustfmt is broken, manually reduce line length

2 years agoadd a rustc::query_stability lint
lcnr [Wed, 5 Jan 2022 12:02:16 +0000 (13:02 +0100)]
add a rustc::query_stability lint

2 years agosilence lint in clippy
lcnr [Tue, 1 Feb 2022 09:13:32 +0000 (10:13 +0100)]
silence lint in clippy

2 years agoimplement lint for suspicious auto trait impls
lcnr [Thu, 27 Jan 2022 09:49:52 +0000 (10:49 +0100)]
implement lint for suspicious auto trait impls

2 years agoupdate `FutureIncompatibilityReason`
lcnr [Thu, 27 Jan 2022 09:49:32 +0000 (10:49 +0100)]
update `FutureIncompatibilityReason`

2 years agoAuto merge of #93534 - ehuss:rollup-9ecozo9, r=ehuss
bors [Tue, 1 Feb 2022 07:04:17 +0000 (07:04 +0000)]
Auto merge of #93534 - ehuss:rollup-9ecozo9, r=ehuss

Rollup of 9 pull requests

Successful merges:

 - #91343 (Fix suggestion to slice if scrutinee is a `Result` or `Option`)
 - #93019 (If an integer is entered with an upper-case base prefix (0Xbeef, 0O755, 0B1010), suggest to make it lowercase)
 - #93090 (`impl Display for io::ErrorKind`)
 - #93456 (Remove an unnecessary transmute from opaque::Encoder)
 - #93492 (Hide failed command unless in verbose mode)
 - #93504 (kmc-solid: Increase the default stack size)
 - #93513 (Allow any pretty printed line to have at least 60 chars)
 - #93532 (Update books)
 - #93533 (Update cargo)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

2 years agoRollup merge of #93533 - ehuss:update-cargo, r=ehuss
Eric Huss [Tue, 1 Feb 2022 04:13:02 +0000 (20:13 -0800)]
Rollup merge of #93533 - ehuss:update-cargo, r=ehuss

Update cargo

10 commits in 1c034752de0df744fcd7788fcbca158830b8bf85..25fcb135d02ea897ce894b67ae021f48107d522b
2022-01-25 22:36:53 +0000 to 2022-02-01 01:32:48 +0000
- fix(install): Keep v1 file formatting the same (rust-lang/cargo#10349)
- fix(vendor): Use tables for sample config (rust-lang/cargo#10348)
- Add bash completion for `cargo clippy` (rust-lang/cargo#10347)
- Do not ignore `--features` when `--all-features` is present (rust-lang/cargo#10337)
- test: Fix compatibilty with new toml_edit (rust-lang/cargo#10350)
- extra-link-arg-etc: support all link types (credit `@davidhewitt)` (rust-lang/cargo#10274)
- Make clippy happy (rust-lang/cargo#10340)
- Update publishing link for semver rules. (rust-lang/cargo#10338)
- Normalize --path when install bin outside current workspace (rust-lang/cargo#10335)
- Bump clap to v3.0.13 (rust-lang/cargo#10336)

2 years agoUpdate cargo
Eric Huss [Tue, 1 Feb 2022 11:26:30 +0000 (03:26 -0800)]
Update cargo

2 years agoRollup merge of #93532 - ehuss:update-books, r=ehuss
Eric Huss [Tue, 1 Feb 2022 04:13:01 +0000 (20:13 -0800)]
Rollup merge of #93532 - ehuss:update-books, r=ehuss

Update books

## nomicon

4 commits in 66d097d3d80e8f88c288c6879c7c2b909ecf8ad4..9493715a6280a1f74be759c7e1ef9999b5d13e6f
2022-01-05 05:45:21 +0900 to 2022-01-27 19:00:32 -0800
- send-and-sync: it's -&gt; its (rust-lang/nomicon#332)
- Clarify the HRTB chapter (rust-lang/nomicon#330)
- Clarify repr(transparent) in other-reprs (rust-lang/nomicon#329)
- Make C code more recognizably C (rust-lang/nomicon#331)

## reference

10 commits in 4dee6eb63d728ffb9e7a2ed443e9ada9275c69d2..411c2f0d5cebf48453ae2d136ad0c5e611d39aec
2022-01-18 09:26:33 -0800 to 2022-01-30 12:46:37 -0800
- paths.md: update comments of `Canoical paths` section (rust-lang/reference#1146)
- Add undocumented outer attributes above StructExpr fields (rust-lang/reference#1150)
-  (rust-lang/reference#1148)
- Fix micro typo in async/unsafe function docs (rust-lang/reference#1145)
- Note difference in CTFE timing between associated and free constants (rust-lang/reference#1120)
- Update the Preludes chapter for the 2021 edition changes to the standard library prelude (rust-lang/reference#1136)
- Link to associated constants section rather than glossary (rust-lang/reference#1141)
- functions.md: replace `argument` with `parameter` (rust-lang/reference#1142)
- Improve rendering (rust-lang/reference#1143)
- (minor) link references and replace wording by syntax definition (rust-lang/reference#1139)

## book

24 commits in f17df27fc14696912c48b8b7a7a8fa49e648088d..98904efaa4fc968db8ff59cf2744d9f7ed158166
2022-01-18 17:46:28 -0500 to 2022-01-29 21:22:31 -0500
- Snapshot of chapter 17 for nostarch
- Remove the section on object safety.
- Don't put a hyphen in 'object safe'. Fixes rust-lang/book#2960.
- Clarify that add_text on Post will work in any state. Fixes rust-lang/book#2159.
- Fix incorrect descriptions of what the code is doing. Fixes rust-lang/book#2745.
- Fix link style and inclusion in print
- Snapshot of ch16 for nostarch
- Cut discussion of threading models Rust *doesn't* support.
- Update a quote of compiler output
- Move transfers between threads, not shares. Fixes rust-lang/book#2843.
- Ch20-02 Remove reference to a long-gone "trick"
- Clarify translations a bit
- Added a mention to the translations appendix
- Fix listing number from `8-5` to `9-5` in `ch09-02`
- Moving example into blockquote means it can't be extracted to a listing project
- Move a link to the end with all the other links
- Propagate edits back to ch 9
- Responding to edits in chapter 9
- Update to 1.58
- Snapshot of chapter 15 for nostarch
- Change 'only difference' to 'main difference'. Fixes rust-lang/book#1581.
- Add a back reference to tuple struct syntax. Fixes rust-lang/book#1916
- Add a link to a section reference
- Remove an outdated example that says it won't compile but it does

## rustc-dev-guide

2 commits in 78dd6a4684cf8d6b72275fab6d0429ea40b66338..8763adb62c712df69b1d39ea3e692b6d696cc4d9
2022-01-18 14:44:26 -0300 to 2022-01-26 14:01:40 -0800
- git.md: Expanded a note to try to stress what you need to do if you're playing
- Clarify that r? works in comments.

## embedded-book

1 commits in 8c395bdd8073deb20ca67e1ed4b14a3a7e315a37..d5fc1bce3f8eb398f9c25f1b15e0257d7537cd41
2021-11-14 11:38:31 +0000 to 2022-01-24 07:13:31 +0000
- Add link to Japanese translation  (rust-embedded/book#311)

2 years agoUpdate books
Eric Huss [Tue, 1 Feb 2022 10:55:55 +0000 (02:55 -0800)]
Update books

2 years agoRollup merge of #93513 - dtolnay:linewidth, r=nagisa
Eric Huss [Tue, 1 Feb 2022 04:13:00 +0000 (20:13 -0800)]
Rollup merge of #93513 - dtolnay:linewidth, r=nagisa

Allow any pretty printed line to have at least 60 chars

Follow-up to #93155. The rustc AST pretty printer has a tendency to get stuck in "vertical smear mode" when formatting highly nested code, where it puts a linebreak at *every possible* linebreak opportunity once the indentation goes beyond the pretty printer's target line width:

```rust
...
                                                              ((&([("test"
                                                                       as
                                                                       &str)]
                                                                     as
                                                                     [&str; 1])
                                                                   as
                                                                   &[&str; 1]),
                                                               (&([]
                                                                     as
                                                                     [ArgumentV1; 0])
                                                                   as
                                                                   &[ArgumentV1; 0]))
...
```

```rust
...
                                                                          [(1
                                                                               as
                                                                               i32),
                                                                           (2
                                                                               as
                                                                               i32),
                                                                           (3
                                                                               as
                                                                               i32)]
                                                                             as
                                                                             [i32; 3]
...
```

This is less common after #93155 because that PR greatly reduced the total amount of indentation, but the "vertical smear mode" failure mode is still just as present when you have deeply nested modules, functions, or trait impls, such as in the case of macro-expanded code from `-Zunpretty=expanded`.

Vertical smear mode is never the best way to format highly indented code though. It does not prevent the target line width from being exceeded, and it produces output that is less readable than just a longer line.

This PR makes the pretty printing algorithm allow a minimum of 60 chars on every line independent of indentation. So as code gets more indented, the right margin eventually recedes to make room for formatting without vertical smear.

```console
├─────────────────────────────────────┤
├─────────────────────────────────────┤
├─────────────────────────────────────┤
  ├───────────────────────────────────┤
    ├─────────────────────────────────┤
      ├───────────────────────────────┤
        ├─────────────────────────────┤
          ├───────────────────────────┤
            ├───────────────────────────┤
              ├───────────────────────────┤
            ├───────────────────────────┤
          ├───────────────────────────┤
        ├─────────────────────────────┤
      ├───────────────────────────────┤
    ├─────────────────────────────────┤
  ├───────────────────────────────────┤
├─────────────────────────────────────┤
```

2 years agoRollup merge of #93504 - solid-rs:fix-kmc-solid-stack-size, r=nagisa
Eric Huss [Tue, 1 Feb 2022 04:12:59 +0000 (20:12 -0800)]
Rollup merge of #93504 - solid-rs:fix-kmc-solid-stack-size, r=nagisa

kmc-solid: Increase the default stack size

This PR increases the default minimum stack size on the [`*-kmc-solid_*`](https://doc.rust-lang.org/nightly/rustc/platform-support/kmc-solid.html) Tier 3 targets to 64KiB (Arm) and 128KiB (AArch64).

This value was chosen as a middle ground between supporting a relatively complex program (e.g., an application using a full-fledged off-the-shelf web server framework) with no additional configuration and minimizing resource consumption for the embedded platform that doesn't support lazily-allocated pages nor over-commitment (i.e., wasted stack spaces are wasted physical memory). If the need arises, the users can always set the `RUST_MIN_STACK` environmental variable to override the default stack size or use the platform API directly.

2 years agoRollup merge of #93492 - Mark-Simulacrum:shorter-failure-output, r=ehuss
Eric Huss [Tue, 1 Feb 2022 04:12:58 +0000 (20:12 -0800)]
Rollup merge of #93492 - Mark-Simulacrum:shorter-failure-output, r=ehuss

Hide failed command unless in verbose mode

This is particularly intended for invoking compiletest; the command line there
is long (3,350 characters on my system) and takes up a lot of screen real estate
for little benefit to the majority of those running bootstrap. This moves
printing it to verbose mode (-v must be passed) which means that it's still
possible to access when needed for debugging.

The main downside is that CI logs will by-default become less usable for
debugging (particularly) spurious failures, but it is pretty rare for us to
really need the information there -- it's usually fairly obvious what is being
run with a little investigation.

r? `@ehuss` as you've done some of the spurious failure investigations, so can
(hopefully) confirm my intuition that this won't seriously hinder them.

2 years agoRollup merge of #93456 - bjorn3:remove_unnecessary_unsafe, r=michaelwoerister
Eric Huss [Tue, 1 Feb 2022 04:12:57 +0000 (20:12 -0800)]
Rollup merge of #93456 - bjorn3:remove_unnecessary_unsafe, r=michaelwoerister

Remove an unnecessary transmute from opaque::Encoder

2 years agoRollup merge of #93090 - jyn514:errorkind-asstr, r=dtolnay
Eric Huss [Tue, 1 Feb 2022 04:12:56 +0000 (20:12 -0800)]
Rollup merge of #93090 - jyn514:errorkind-asstr, r=dtolnay

`impl Display for io::ErrorKind`

This avoids having to convert from `ErrorKind` to `Error` just to print the error message.

2 years agoRollup merge of #93019 - 5225225:uppercase-suffix, r=wesleywiser
Eric Huss [Tue, 1 Feb 2022 04:12:55 +0000 (20:12 -0800)]
Rollup merge of #93019 - 5225225:uppercase-suffix, r=wesleywiser

If an integer is entered with an upper-case base prefix (0Xbeef, 0O755, 0B1010), suggest to make it lowercase

The current error for this case isn't really great, it just complains about the whole thing past the `0` being an invalid suffix.

2 years agoRollup merge of #91343 - FabianWolff:issue-91328-as-deref, r=jackh726
Eric Huss [Tue, 1 Feb 2022 04:12:55 +0000 (20:12 -0800)]
Rollup merge of #91343 - FabianWolff:issue-91328-as-deref, r=jackh726

Fix suggestion to slice if scrutinee is a `Result` or `Option`

Fixes #91328.

2 years agoAuto merge of #93259 - eddyb:diagbld-scalar-pair, r=jackh726
bors [Tue, 1 Feb 2022 03:58:32 +0000 (03:58 +0000)]
Auto merge of #93259 - eddyb:diagbld-scalar-pair, r=jackh726

rustc_errors: only box the `diagnostic` field in `DiagnosticBuilder`.

I happened to need to do the first change (replacing `allow_suggestions` with equivalent functionality on `Diagnostic` itself) as part of a larger change, and noticed that there's only two fields left in `DiagnosticBuilderInner`.

So with this PR, instead of a single pointer, `DiagnosticBuilder` is two pointers, which should work just as well for passing *it* by value (and may even work better wrt some operations, though probably not by much).

But anything that was already taking advantage of `DiagnosticBuilder` being a single pointer, and wrapping it further (e.g. `Result<T, DiagnosticBuilder>` w/ non-ZST `T`), ~~will probably see a slowdown~~, so I want to do a perf run before even trying to propose this.

2 years agoFix incorrect panic message in example
TheVoid [Tue, 1 Feb 2022 02:19:08 +0000 (10:19 +0800)]
Fix incorrect panic message in example

2 years agoImprove test coverage of {Chunks,RChunks,RChunksMut}::{next,next_back}
Thom Chiovoloni [Tue, 1 Feb 2022 01:35:19 +0000 (17:35 -0800)]
Improve test coverage of {Chunks,RChunks,RChunksMut}::{next,next_back}

2 years agoAuto merge of #93386 - WaffleLapkin:rustc_must_implement_one_of_check_target, r=nagisa
bors [Tue, 1 Feb 2022 00:50:28 +0000 (00:50 +0000)]
Auto merge of #93386 - WaffleLapkin:rustc_must_implement_one_of_check_target, r=nagisa

Check that `#[rustc_must_implement_one_of]` is applied to a trait

`#[rustc_must_implement_one_of]` only makes sense when applied to a trait, so it's sensible to emit an error otherwise.

2 years agoValidate that values in switch int terminator are unique
Tomasz Miąsko [Tue, 1 Feb 2022 00:00:00 +0000 (00:00 +0000)]
Validate that values in switch int terminator are unique

2 years ago(#93493) Add items from code review
George Bateman [Mon, 31 Jan 2022 23:49:16 +0000 (23:49 +0000)]
(#93493) Add items from code review

2 years agoAuto merge of #93381 - tmiasko:is-self-recursive, r=ecstatic-morse
bors [Mon, 31 Jan 2022 21:16:17 +0000 (21:16 +0000)]
Auto merge of #93381 - tmiasko:is-self-recursive, r=ecstatic-morse

Check the number of arguments first in `is_recursive_call`

2 years agoadd inline attribute to new method
Jane Lusby [Mon, 31 Jan 2022 19:57:17 +0000 (11:57 -0800)]
add inline attribute to new method

2 years agoAdd FIXME comment
Fabian Wolff [Mon, 31 Jan 2022 19:34:26 +0000 (20:34 +0100)]
Add FIXME comment

2 years agoFactor convenience functions out of main printer implementation
David Tolnay [Fri, 21 Jan 2022 21:08:54 +0000 (13:08 -0800)]
Factor convenience functions out of main printer implementation

2 years agoBless all pretty printer tests and ui tests
David Tolnay [Fri, 21 Jan 2022 10:28:11 +0000 (02:28 -0800)]
Bless all pretty printer tests and ui tests

2 years agoAllow any line to have at least 60 chars
David Tolnay [Mon, 31 Jan 2022 18:56:57 +0000 (10:56 -0800)]
Allow any line to have at least 60 chars

2 years agoExtract constant MARGIN out of Printer struct
David Tolnay [Mon, 31 Jan 2022 18:56:40 +0000 (10:56 -0800)]
Extract constant MARGIN out of Printer struct

2 years agoAdd ValuePairs::Terms & Fix compile error
kadmin [Fri, 28 Jan 2022 18:14:27 +0000 (18:14 +0000)]
Add ValuePairs::Terms & Fix compile error

And use correct substs.

2 years agoAdd match on `Vec<_>` to `ui/typeck/issue-91328.rs` test
Fabian Wolff [Sat, 15 Jan 2022 20:33:11 +0000 (21:33 +0100)]
Add match on `Vec<_>` to `ui/typeck/issue-91328.rs` test

2 years agoFix suggestion to slice if scrutinee is a `Result` or `Option`
Fabian Wolff [Mon, 29 Nov 2021 00:50:12 +0000 (01:50 +0100)]
Fix suggestion to slice if scrutinee is a `Result` or `Option`

2 years agoAuto merge of #93348 - spastorino:fix-perf-overlap-mode2, r=nikomatsakis
bors [Mon, 31 Jan 2022 17:36:11 +0000 (17:36 +0000)]
Auto merge of #93348 - spastorino:fix-perf-overlap-mode2, r=nikomatsakis

 Move overlap_mode into trait level attribute

r? `@nikomatsakis`

Should fix some performance regressions noted on https://github.com/rust-lang/rust/pull/93175

2 years agoWrite UI tests, tweak message
5225225 [Thu, 27 Jan 2022 22:22:33 +0000 (22:22 +0000)]
Write UI tests, tweak message

2 years agoRemove two unnecessary transmutes from opaque Encoder and Decoder
bjorn3 [Sat, 29 Jan 2022 13:36:35 +0000 (14:36 +0100)]
Remove two unnecessary transmutes from opaque Encoder and Decoder

2 years agoTake in account the unreachable! macro in the non_fmt_panic lint
Loïc BRANSTETT [Sun, 23 Jan 2022 13:57:49 +0000 (14:57 +0100)]
Take in account the unreachable! macro in the non_fmt_panic lint

2 years agoFix invalid special casing of the unreachable! macro
Loïc BRANSTETT [Fri, 21 Jan 2022 22:04:06 +0000 (23:04 +0100)]
Fix invalid special casing of the unreachable! macro