]> git.lizzy.rs Git - rust.git/log
rust.git
21 months agoRollup merge of #102782 - Hosshii:issue-102124, r=Mark-Simulacrum
Michael Howell [Sun, 9 Oct 2022 01:15:00 +0000 (18:15 -0700)]
Rollup merge of #102782 - Hosshii:issue-102124, r=Mark-Simulacrum

Add regression test for #102124

closes #102124, which was already fixed on nightly.

21 months agoRollup merge of #102661 - chrysn-pull-requests:rustdoc-effect-of-fundamental, r=notriddle
Michael Howell [Sun, 9 Oct 2022 01:15:00 +0000 (18:15 -0700)]
Rollup merge of #102661 - chrysn-pull-requests:rustdoc-effect-of-fundamental, r=notriddle

rustdoc: Document effect of fundamental types

This was implemented in https://github.com/rust-lang/rust/pull/96565, but not documented. But it's a useful feature for everyone who implements own wrapper (especially wrappers-around-pointers) types, so that they can behave like pointers (and stdlib wrappers) do -- so here goes a mention in the unstable section of the rustdoc book.

(That is where I initially looked to find tricks for making my own wrapper types be transparent to documentation).

21 months agoRollup merge of #102514 - b-naber:binder-print-fixes, r=jackh726
Michael Howell [Sun, 9 Oct 2022 01:14:59 +0000 (18:14 -0700)]
Rollup merge of #102514 - b-naber:binder-print-fixes, r=jackh726

Don't repeat lifetime names from outer binder in print

Fixes https://github.com/rust-lang/rust/issues/102392
Fixes https://github.com/rust-lang/rust/issues/102414

r? ```@lcnr```

21 months agoRollup merge of #99818 - aliemjay:fix-closure-normalize, r=jackh726
Michael Howell [Sun, 9 Oct 2022 01:14:59 +0000 (18:14 -0700)]
Rollup merge of #99818 - aliemjay:fix-closure-normalize, r=jackh726

don't ICE when normalizing closure input tys

We were ICEing while rendering diagnostics because `universe_causes` is expected to track every universe created in the typeck's infcx.

`normalize_and_add_constraints` doesn't update `universe_causes`
when creating new universes, causing an ICE. Remove it!

Add spans to better track normalization constraints.

Fix couple places where `universe_causes` is not updated correctly to
track newly added universes.

Fixes #102800

~Fixess #99665~ (UPDATE: no longer true; the issue has a different failure path than when this PR was created and should be fixed by #101708, but the changes in this PR are still correct and should prevent potential future ICEs)

21 months agoAuto merge of #102819 - matthiaskrgr:rollup-xwnvofc, r=matthiaskrgr
bors [Sat, 8 Oct 2022 21:43:25 +0000 (21:43 +0000)]
Auto merge of #102819 - matthiaskrgr:rollup-xwnvofc, r=matthiaskrgr

Rollup of 7 pull requests

Successful merges:

 - #99194 (Fix gdb-cmd for rust-gdbgui)
 - #99880 (`EscapeAscii` is not an `ExactSizeIterator`)
 - #102524 (rustdoc: remove weird `<a href="#">` wrapper around unsafe triangle)
 - #102581 (Make the `config.src` handling for downloadable bootstrap more conservative)
 - #102604 (Improve readability of bootstrap's README)
 - #102723 (test: run-make: skip when cross-compiling)
 - #102815 (rustdoc: remove mobile topbar from source pages instead of hiding it)

Failed merges:

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

21 months agoShow let-else suggestion on stable.
Eric Huss [Sat, 8 Oct 2022 21:39:25 +0000 (14:39 -0700)]
Show let-else suggestion on stable.

21 months agoRollup merge of #102815 - notriddle:notriddle/mobile-topbar, r=GuillaumeGomez
Matthias Krüger [Sat, 8 Oct 2022 21:32:05 +0000 (23:32 +0200)]
Rollup merge of #102815 - notriddle:notriddle/mobile-topbar, r=GuillaumeGomez

rustdoc: remove mobile topbar from source pages instead of hiding it

21 months agoRollup merge of #102723 - pcc:run-make-cc, r=Mark-Simulacrum
Matthias Krüger [Sat, 8 Oct 2022 21:32:04 +0000 (23:32 +0200)]
Rollup merge of #102723 - pcc:run-make-cc, r=Mark-Simulacrum

test: run-make: skip when cross-compiling

This test fails when targeting aarch64 Android. Instead of adding yet another architecture here (and one that's increasingly more common as the host), let's replace the growing list of architectures with ignore-cross-compile.

21 months agoRollup merge of #102604 - anirudh24seven:anirudh_improve_bootrap_readme_readability...
Matthias Krüger [Sat, 8 Oct 2022 21:32:04 +0000 (23:32 +0200)]
Rollup merge of #102604 - anirudh24seven:anirudh_improve_bootrap_readme_readability, r=Mark-Simulacrum

Improve readability of bootstrap's README

Improve readability of bootstrap's README by adding commas & minor changes

21 months agoRollup merge of #102581 - jyn514:src-detection, r=Mark-Simulacrum
Matthias Krüger [Sat, 8 Oct 2022 21:32:03 +0000 (23:32 +0200)]
Rollup merge of #102581 - jyn514:src-detection, r=Mark-Simulacrum

Make the `config.src` handling for downloadable bootstrap more conservative

In particular, this supports build directories within an unrelated git repository. Fixes https://github.com/rust-lang/rust/issues/102562.

As a side effect, it will fall back to the old logic when the source directory is being built from a tarball within an unrelated git repository. However, that second case is unsupported and untested; we reserve the right to break it in the future.

`@cr1901` can you confirm this fixes your problem?
cc `@kleisauke,` I believe this will also fix your issue (although your use case still isn't supported).

r? `@Mark-Simulacrum`

21 months agoRollup merge of #102524 - notriddle:notriddle/unsafe-function, r=GuillaumeGomez
Matthias Krüger [Sat, 8 Oct 2022 21:32:03 +0000 (23:32 +0200)]
Rollup merge of #102524 - notriddle:notriddle/unsafe-function, r=GuillaumeGomez

rustdoc: remove weird `<a href="#">` wrapper around unsafe triangle

This DOM cleanup changes the color of the triangle, from blue to black, but since it's still a different color from the link it's next to, it should still be noticeable.

# Before

![image](https://user-images.githubusercontent.com/1593513/193352428-929b3026-acc3-448e-9bac-44dddf206b1d.png)

# After

![image](https://user-images.githubusercontent.com/1593513/193352500-2f7a0112-b478-4cc4-9ddb-32ba11575530.png)

21 months agoRollup merge of #99880 - compiler-errors:escape-ascii-is-not-exact-size-iterator...
Matthias Krüger [Sat, 8 Oct 2022 21:32:02 +0000 (23:32 +0200)]
Rollup merge of #99880 - compiler-errors:escape-ascii-is-not-exact-size-iterator, r=thomcc

`EscapeAscii` is not an `ExactSizeIterator`

Fixes #99878

Do we want/need `EscapeAscii` to be an `ExactSizeIterator`? I guess we could precompute the length of the output if so?

21 months agoRollup merge of #99194 - simlay:simlay/update-rust-gdbgui-gdb-args-to-gdb-cmd, r...
Matthias Krüger [Sat, 8 Oct 2022 21:32:01 +0000 (23:32 +0200)]
Rollup merge of #99194 - simlay:simlay/update-rust-gdbgui-gdb-args-to-gdb-cmd, r=Mark-Simulacrum

Fix gdb-cmd for rust-gdbgui

With https://github.com/cs01/gdbgui/pull/198, the way that gdbgui arguments were specified changed. I've tested this with program generated from `cargo new --bin` and it worked as gdbgui should.

Closes #76383.

21 months agoClean up rustdoc highlight.rs imports a bit
Guillaume Gomez [Sat, 8 Oct 2022 20:09:51 +0000 (22:09 +0200)]
Clean up rustdoc highlight.rs imports a bit

21 months agostd: optimize TLS on Windows
joboet [Sat, 8 Oct 2022 18:19:21 +0000 (20:19 +0200)]
std: optimize TLS on Windows

21 months agoAuto merge of #102315 - RalfJung:assert_unsafe_precondition, r=thomcc
bors [Sat, 8 Oct 2022 17:59:45 +0000 (17:59 +0000)]
Auto merge of #102315 - RalfJung:assert_unsafe_precondition, r=thomcc

add a few more assert_unsafe_precondition

Add debug-assertion checking for `ptr.read()`, `ptr.write(_)`, and `unreachable_unchecked.`

This is quite useful for [cargo-careful](https://github.com/RalfJung/cargo-careful).

21 months agorustdoc: add test case for dimensions and color of unsafe `<sup>`
Michael Howell [Sat, 8 Oct 2022 16:36:37 +0000 (09:36 -0700)]
rustdoc: add test case for dimensions and color of unsafe `<sup>`

21 months agorustdoc: remove weird `<a href="#">` wrapper around unsafe triangle
Michael Howell [Fri, 30 Sep 2022 20:32:33 +0000 (13:32 -0700)]
rustdoc: remove weird `<a href="#">` wrapper around unsafe triangle

This DOM cleanup changes the color of the triangle, from blue to black, but
since it's still a different color from the link it's next to, it should
still be noticeable.

21 months agorustdoc: remove mobile topbar from source pages instead of hiding it
Michael Howell [Sat, 8 Oct 2022 17:43:23 +0000 (10:43 -0700)]
rustdoc: remove mobile topbar from source pages instead of hiding it

21 months agoAuto merge of #13366 - matklad:xflags, r=lnicola
bors [Sat, 8 Oct 2022 16:46:15 +0000 (16:46 +0000)]
Auto merge of #13366 - matklad:xflags, r=lnicola

internal: :arrow_up: xflags

The main change here should be that flags are not inhereted, so

   $ rust-analyzer analysis-stats . -v -v

would do what it should do

We also no longer Don\'t

21 months agohandle late-bound vars from inner binders correctly and add test
b-naber [Sat, 8 Oct 2022 13:52:59 +0000 (15:52 +0200)]
handle late-bound vars from inner binders correctly and add test

21 months agoAuto merge of #102809 - matthiaskrgr:rollup-qq62vuv, r=matthiaskrgr
bors [Sat, 8 Oct 2022 14:58:11 +0000 (14:58 +0000)]
Auto merge of #102809 - matthiaskrgr:rollup-qq62vuv, r=matthiaskrgr

Rollup of 8 pull requests

Successful merges:

 - #101520 (Allow transmutes between the same types after erasing lifetimes)
 - #102675 (Remove `mir::CastKind::Misc`)
 - #102778 (Fix MIR inlining of asm_unwind)
 - #102785 (Remove `DefId` from some `SelectionCandidate` variants)
 - #102788 (Update rustc-dev-guide)
 - #102789 (Update browser UI test version)
 - #102797 (rustdoc: remove no-op CSS `.rightside { position: initial }`)
 - #102798 (rustdoc: add main-heading and example-wrap link CSS to big selector)

Failed merges:

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

21 months agointernal: :arrow_up: xflags
Aleksey Kladov [Sat, 8 Oct 2022 14:35:07 +0000 (15:35 +0100)]
internal: :arrow_up: xflags

The main change here should be that flags are not inhereted, so

   $ rust-analyzer analysis-stats . -v -v

would do what it should do

We also no longer Don\'t

21 months agoRemove empty core::lazy and std::lazy
est31 [Sat, 8 Oct 2022 13:55:15 +0000 (15:55 +0200)]
Remove empty core::lazy and std::lazy

PR #98165 with commits 7c360dc117d554a11f7193505da0835c4b890c6f and c1a2db3372a4d6896744919284f3287650a38ab7
has moved all of the components of these modules into different places,
namely {std,core}::sync and {std,core}::cell. The empty
modules remained. As they are unstable, we can simply remove them.

21 months agouse memset to initialize a readbuf
The 8472 [Sat, 8 Oct 2022 10:55:43 +0000 (12:55 +0200)]
use memset to initialize a readbuf

21 months agoRollup merge of #102798 - notriddle:notriddle/text-decoration-underline, r=GuillaumeGomez
Matthias Krüger [Sat, 8 Oct 2022 12:38:21 +0000 (14:38 +0200)]
Rollup merge of #102798 - notriddle:notriddle/text-decoration-underline, r=GuillaumeGomez

rustdoc: add main-heading and example-wrap link CSS to big selector

This makes the stylesheet more consistent about how it handles link hover.

21 months agoRollup merge of #102797 - notriddle:notriddle/rightside-position, r=GuillaumeGomez
Matthias Krüger [Sat, 8 Oct 2022 12:38:21 +0000 (14:38 +0200)]
Rollup merge of #102797 - notriddle:notriddle/rightside-position, r=GuillaumeGomez

rustdoc: remove no-op CSS `.rightside { position: initial }`

This CSS, added in 34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9, overrode CSS that was applied to the `.since` class:

https://github.com/rust-lang/rust/blob/34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9/src/librustdoc/html/static/rustdoc.css#L782-L795

The absolute positioning for `.since` was abandoned in favor of always floating it, so this is no longer needed:

https://github.com/rust-lang/rust/commit/5de1391b88007a1d4f7b1517657a86aae352af1e#diff-7dc22a0530802d77c2f2ec9e834024a5657b6eab4055520fca46edc99a544413L902-L904

21 months agoRollup merge of #102789 - GuillaumeGomez:update-browser-ui-test-version, r=notriddle
Matthias Krüger [Sat, 8 Oct 2022 12:38:20 +0000 (14:38 +0200)]
Rollup merge of #102789 - GuillaumeGomez:update-browser-ui-test-version, r=notriddle

Update browser UI test version

It added the possibility to concatenate strings and numbers and updated the `goto` command so it doesn't stand on its own anymore.

r? ````@notriddle````

21 months agoRollup merge of #102788 - joshtriplett:bump-rustc-dev-guide, r=ehuss
Matthias Krüger [Sat, 8 Oct 2022 12:38:20 +0000 (14:38 +0200)]
Rollup merge of #102788 - joshtriplett:bump-rustc-dev-guide, r=ehuss

Update rustc-dev-guide

- .gitattributes: Mark minified javascript as binary to filter greps
- fix very minor punctuation typo
- diagnostic structs: derive on enum (#1477)
- Update running tests with the new flags (#1476)
- Rename typeck to hir_analysis (#1475)
- fix typo and make paragraph consistent (#1474)
- Update about-this-guide.md
- Link to the correct page in "about this guide"
- Update r-a config suggestions
- don't refer to the compile-time interpreter as "Miri" (#1471)
- UPDATE - Diagnostic docs to reflect renamed traits and macros in rustc PR#101558
- Update mdbook and its extensions versions
- Remove unmaintained action
- Update some actions versions
- Fix some typos

Update motivated in large part by the most recent commit, to fix `git
grep`.

21 months agoRollup merge of #102785 - fee1-dead-contrib:rm_autoimpl_defid, r=compiler-errors
Matthias Krüger [Sat, 8 Oct 2022 12:38:19 +0000 (14:38 +0200)]
Rollup merge of #102785 - fee1-dead-contrib:rm_autoimpl_defid, r=compiler-errors

Remove `DefId` from some `SelectionCandidate` variants

They are both from `obligation.predicate.def_id()`, which do not need to be on the `SelectionCandidate`.

cc ````@lcnr```` ````@compiler-errors````

21 months agoRollup merge of #102778 - nbdd0121:mir, r=tmiasko
Matthias Krüger [Sat, 8 Oct 2022 12:38:19 +0000 (14:38 +0200)]
Rollup merge of #102778 - nbdd0121:mir, r=tmiasko

Fix MIR inlining of asm_unwind

The MIR inlining currently doesn't handle inline asm's unwind edge correctly.

This code will cause ICE:
```rust
struct D;

impl Drop for D {
    fn drop(&mut self) {}
}

#[inline(always)]
fn foo() {
    let _d = D;
    unsafe { std::arch::asm!("", options(may_unwind)) };
}

pub fn main() {
    foo();
}
```

This PR fixes this issue. I also take the opportunity to extract common code into a method.

21 months agoRollup merge of #102675 - ouz-a:mir-technical-debt, r=oli-obk
Matthias Krüger [Sat, 8 Oct 2022 12:38:18 +0000 (14:38 +0200)]
Rollup merge of #102675 - ouz-a:mir-technical-debt, r=oli-obk

Remove `mir::CastKind::Misc`

As discussed in #97649 `mir::CastKind::Misc` is not clear, this PR addresses that by creating a new enum variant for every valid cast.

r? ````@oli-obk````

21 months agoRollup merge of #101520 - oli-obk:transmute_lifetimes, r=compiler-errors
Matthias Krüger [Sat, 8 Oct 2022 12:38:18 +0000 (14:38 +0200)]
Rollup merge of #101520 - oli-obk:transmute_lifetimes, r=compiler-errors

Allow transmutes between the same types after erasing lifetimes

r? ````@compiler-errors````  on the impl

fixes #101081

See discussion in the issue and at https://rust-lang.zulipchat.com/#narrow/stream/326866-t-types.2Fnominated/topic/.23101081.3A.20Regression.20transmuting.20.60RwLockReadGuard.3CT.3A.20.3FSized.3E.E2.80.A6

I think this may need lang team signoff as its implications may go beyond the jurisdiction of T-types

I'll write up a proper summary later

21 months agoAuto merge of #100720 - camsteffen:representable, r=cjgillot
bors [Sat, 8 Oct 2022 11:53:25 +0000 (11:53 +0000)]
Auto merge of #100720 - camsteffen:representable, r=cjgillot

Rewrite representability

 * Improve placement of `Box` in the suggestion
 * Multiple items in a cycle emit 1 error instead of an error for each item in the cycle
 * Introduce `representability` query to avoid traversing an item every time it is used.
 * Also introduce `params_in_repr` query to avoid traversing generic items every time it is used.

21 months agoDocument `rust-docs-json` component
Nixon Enraght-Moony [Sat, 8 Oct 2022 11:13:57 +0000 (12:13 +0100)]
Document `rust-docs-json` component

21 months agoStabilize half_open_range_patterns
Urgau [Sat, 24 Sep 2022 15:22:04 +0000 (17:22 +0200)]
Stabilize half_open_range_patterns

21 months agoSplit slice part of feature(half_open_range_patterns) to [...]_in_slices
Urgau [Wed, 5 Oct 2022 21:18:22 +0000 (23:18 +0200)]
Split slice part of feature(half_open_range_patterns) to [...]_in_slices

21 months agoAuto merge of #99505 - joboet:futex_once, r=thomcc
bors [Sat, 8 Oct 2022 03:50:07 +0000 (03:50 +0000)]
Auto merge of #99505 - joboet:futex_once, r=thomcc

std: use futex in `Once`

Now that we have efficient locks, let's optimize the rest of `sync` as well. This PR adds a futex-based implementation for `Once`, which drastically simplifies the implementation compared to the generic version, which is provided as fallback for platforms without futex (Windows only supports them on newer versions, so it uses the fallback for now).

Instead of storing a linked list of waiters, the new implementation adds another state (`QUEUED`), which is set when there are waiting threads. These now use `futex_wait` on that state and are woken by the running thread when it finishes and notices the `QUEUED` state, thereby avoiding unnecessary calls to `futex_wake_all`.

21 months agodon't ICE when normalizing closure input tys
Ali MJ Al-Nasrawy [Wed, 27 Jul 2022 17:54:59 +0000 (20:54 +0300)]
don't ICE when normalizing closure input tys

`normalize_and_add_constraints` doesn't add entries in `universe_causes`
when creating new universes, causing an ICE. Remove it!

Add spans to track normalization constraints.

Fix couple places where `universe_causes` is not updated correctly to
track newly added universes.

21 months agoMake tests capture the error printed by a Result return
David Tolnay [Fri, 7 Oct 2022 20:45:41 +0000 (13:45 -0700)]
Make tests capture the error printed by a Result return

21 months agorustdoc: add main-heading and example-wrap link CSS to big selector
Michael Howell [Sat, 8 Oct 2022 00:05:30 +0000 (17:05 -0700)]
rustdoc: add main-heading and example-wrap link CSS to big selector

This makes the stylesheet more consistent about how it handles link hover.

21 months agoAuto merge of #102792 - weihanglo:update-cargo, r=ehuss
bors [Fri, 7 Oct 2022 23:59:08 +0000 (23:59 +0000)]
Auto merge of #102792 - weihanglo:update-cargo, r=ehuss

Update cargo

4 commits in 0b84a35c2c7d70df4875a03eb19084b0e7a543ef..3cdf1ab25dc4fe56f890e8c7330d53a23ad905d3

2022-10-03 19:13:21 +0000 to 2022-10-07 17:34:03 +0000
- fix(test): Distinguish 'testname' from escaped arguments (rust-lang/cargo#11190)
- Fix sparse registry lockfile urls containing 'registry+sparse+' (rust-lang/cargo#11177)
- doc(features2): polish docs a bit (rust-lang/cargo#11185)
- Import `cargo remove` into cargo (rust-lang/cargo#11099)

21 months agorustdoc: remove no-op CSS `.rightside { position: initial }`
Michael Howell [Fri, 7 Oct 2022 23:47:44 +0000 (16:47 -0700)]
rustdoc: remove no-op CSS `.rightside { position: initial }`

This CSS, added in 34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9, overrode CSS
that was applied to the `.since` class:

https://github.com/rust-lang/rust/blob/34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9/src/librustdoc/html/static/rustdoc.css#L782-L795

The absolute positioning for `.since` was abandoned in favor of always
floating it, so this is no longer needed:

https://github.com/rust-lang/rust/commit/5de1391b88007a1d4f7b1517657a86aae352af1e#diff-7dc22a0530802d77c2f2ec9e834024a5657b6eab4055520fca46edc99a544413L902-L904

21 months agorustdoc: remove hover gap in file picker
Roland Strasser [Fri, 7 Oct 2022 23:30:13 +0000 (01:30 +0200)]
rustdoc: remove hover gap in file picker

21 months agofix #102182, recover from impl Trait in type param bound
yukang [Tue, 27 Sep 2022 06:25:29 +0000 (14:25 +0800)]
fix #102182, recover from impl Trait in type param bound

21 months agoDon't run llvm-config in dry runs
Josh Stone [Fri, 7 Oct 2022 22:12:27 +0000 (15:12 -0700)]
Don't run llvm-config in dry runs

21 months agoAuto merge of #102091 - RalfJung:const_err, r=oli-obk
bors [Fri, 7 Oct 2022 20:50:51 +0000 (20:50 +0000)]
Auto merge of #102091 - RalfJung:const_err, r=oli-obk

make const_err a hard error

This lint has been deny-by-default with future incompat wording since [Rust 1.51](https://github.com/rust-lang/rust/pull/80394) and the stable release of this week starts showing it in cargo's future compat reports. I can't wait to finally get rid of at least some of the mess in our const-err-reporting-code. ;)

r? `@oli-obk`
Fixes https://github.com/rust-lang/rust/issues/71800
Fixes https://github.com/rust-lang/rust/issues/100114

21 months agoavoid string dispatch in fluent
Nathan Stocks [Fri, 7 Oct 2022 20:39:09 +0000 (14:39 -0600)]
avoid string dispatch in fluent

21 months agoCast vtable type too
Eric Holk [Fri, 7 Oct 2022 20:05:45 +0000 (13:05 -0700)]
Cast vtable type too

21 months agoavoid string dispatch in fluent
Nathan Stocks [Wed, 5 Oct 2022 22:28:32 +0000 (16:28 -0600)]
avoid string dispatch in fluent

21 months agoRemove code that was removed in master, and the corresponding diagnostic
Nathan Stocks [Wed, 5 Oct 2022 21:46:14 +0000 (15:46 -0600)]
Remove code that was removed in master, and the corresponding diagnostic

21 months agoFirst batch of review feedback changes from #102110
Nathan Stocks [Mon, 3 Oct 2022 23:34:59 +0000 (17:34 -0600)]
First batch of review feedback changes from #102110

21 months agomigrate stability.rs to translateable diagnostics
Nathan Stocks [Mon, 3 Oct 2022 03:22:46 +0000 (21:22 -0600)]
migrate stability.rs to translateable diagnostics

21 months agomigrate the rest of check_attr.rs to translateable diagnostics
Nathan Stocks [Sun, 2 Oct 2022 20:34:10 +0000 (14:34 -0600)]
migrate the rest of check_attr.rs to translateable diagnostics

21 months agomigrate dead.rs to translateable diagnostics
Nathan Stocks [Sun, 2 Oct 2022 00:39:02 +0000 (18:39 -0600)]
migrate dead.rs to translateable diagnostics

21 months agomigrate lang_items.rs to translateable diagnostics
Nathan Stocks [Sat, 1 Oct 2022 19:48:22 +0000 (13:48 -0600)]
migrate lang_items.rs to translateable diagnostics

21 months agomigrate entry.rs to translateable diagnostics
Nathan Stocks [Wed, 28 Sep 2022 20:02:03 +0000 (14:02 -0600)]
migrate entry.rs to translateable diagnostics

21 months agomigrate naked_functions.rs to translateable diagnostics
Nathan Stocks [Tue, 27 Sep 2022 15:44:56 +0000 (09:44 -0600)]
migrate naked_functions.rs to translateable diagnostics

21 months agomigrate loops.rs to translateable diagnostics
Nathan Stocks [Mon, 26 Sep 2022 04:52:19 +0000 (22:52 -0600)]
migrate loops.rs to translateable diagnostics

21 months agomigrate check_const.rs to translateable diagnostics
Nathan Stocks [Sat, 24 Sep 2022 18:49:29 +0000 (12:49 -0600)]
migrate check_const.rs to translateable diagnostics

21 months agomigrate lib_features.rs to translateable diagnostics
Nathan Stocks [Sat, 24 Sep 2022 18:21:58 +0000 (12:21 -0600)]
migrate lib_features.rs to translateable diagnostics

21 months agomigrate layout_test.rs to translateable diagnostics
Nathan Stocks [Fri, 23 Sep 2022 18:23:18 +0000 (12:23 -0600)]
migrate layout_test.rs to translateable diagnostics

21 months agomigrate diagnostic_items.rs to translateable diagnostics
Nathan Stocks [Fri, 23 Sep 2022 00:23:05 +0000 (18:23 -0600)]
migrate diagnostic_items.rs to translateable diagnostics

21 months agouse cherry-picked commit from #100754 to emit note without error
Nathan Stocks [Thu, 22 Sep 2022 16:15:51 +0000 (10:15 -0600)]
use cherry-picked commit from #100754 to emit note without error

21 months agoerrors: add `emit_note`/`create_note`
David Wood [Thu, 1 Sep 2022 10:40:43 +0000 (11:40 +0100)]
errors: add `emit_note`/`create_note`

Add `Noted` marker struct that implements `EmissionGuarantee` so that
`emit_note` and `create_note` can be implemented for struct diagnostics.

Signed-off-by: David Wood <david.wood@huawei.com>
21 months agomigrate debugger_visualizer.rs to translateable diagnostics
Nathan Stocks [Thu, 22 Sep 2022 04:55:29 +0000 (22:55 -0600)]
migrate debugger_visualizer.rs to translateable diagnostics

21 months agomigrate the rest of weak_lang_items.rs to translateable diagnostics
Nathan Stocks [Thu, 22 Sep 2022 04:49:30 +0000 (22:49 -0600)]
migrate the rest of weak_lang_items.rs to translateable diagnostics

21 months agoresolve merge conflict from cherry-picking 6a47326a0452cc8d5cb57676508b5469d648c67f
Diego de Oliveira [Wed, 14 Sep 2022 18:03:12 +0000 (15:03 -0300)]
resolve merge conflict from cherry-picking 6a47326a0452cc8d5cb57676508b5469d648c67f

21 months agouse consistent names
Nathan Stocks [Thu, 22 Sep 2022 04:30:14 +0000 (22:30 -0600)]
use consistent names

21 months agoalways put ftl message on next line, resolve all but 1 output comparison error
Nathan Stocks [Wed, 21 Sep 2022 20:05:15 +0000 (14:05 -0600)]
always put ftl message on next line, resolve all but 1 output comparison error

21 months agoMigrate InvalidAttrAtCrateLevel
rdvdev2 [Fri, 2 Sep 2022 03:19:03 +0000 (05:19 +0200)]
Migrate InvalidAttrAtCrateLevel

Co-authored-by: Nathan Stocks <cleancut@github.com>
Co-authored-by: rdvdev2 <rdvdev2@gmail.com>
21 months agoMigrate derivable diagnostics in check_attr.rs
rdvdev2 [Fri, 2 Sep 2022 02:54:42 +0000 (04:54 +0200)]
Migrate derivable diagnostics in check_attr.rs

21 months agoMigrate derivable diagnostics in lang_items.rs
rdvdev2 [Thu, 1 Sep 2022 22:11:44 +0000 (00:11 +0200)]
Migrate derivable diagnostics in lang_items.rs

21 months agoMigrate weak_lang_items.rs
rdvdev2 [Mon, 22 Aug 2022 08:05:13 +0000 (10:05 +0200)]
Migrate weak_lang_items.rs

21 months agoAdd lint for diagnostic migration
rdvdev2 [Mon, 22 Aug 2022 06:56:46 +0000 (08:56 +0200)]
Add lint for diagnostic migration

21 months agoUpdate cargo
Weihang Lo [Fri, 7 Oct 2022 19:10:52 +0000 (20:10 +0100)]
Update cargo

4 commits in 0b84a35c2c7d70df4875a03eb19084b0e7a543ef..3cdf1ab25dc4fe56f890e8c7330d53a23ad905d3

2022-10-03 19:13:21 +0000 to 2022-10-07 17:34:03 +0000
- fix(test): Distinguish 'testname' from escaped arguments (rust-lang/cargo#11190)
- Fix sparse registry lockfile urls containing 'registry+sparse+' (rust-lang/cargo#11177)
- doc(features2): polish docs a bit (rust-lang/cargo#11185)
- Import `cargo remove` into cargo (rust-lang/cargo#11099)

21 months agoBump download-ci-llvm-stamp
Josh Stone [Fri, 7 Oct 2022 18:29:24 +0000 (11:29 -0700)]
Bump download-ci-llvm-stamp

21 months agoAdd llvm-tblgen to rust-dev for cross-compiling
Josh Stone [Fri, 7 Oct 2022 18:25:01 +0000 (11:25 -0700)]
Add llvm-tblgen to rust-dev for cross-compiling

21 months agoLet llvm-config tell us where to find its tools
Josh Stone [Fri, 7 Oct 2022 18:24:02 +0000 (11:24 -0700)]
Let llvm-config tell us where to find its tools

21 months agoUpdate rustdoc-gui test to new browser-ui-test version
Guillaume Gomez [Fri, 7 Oct 2022 18:17:05 +0000 (20:17 +0200)]
Update rustdoc-gui test to new browser-ui-test version

21 months agoUpdate browser-ui-test version
Guillaume Gomez [Fri, 7 Oct 2022 18:17:16 +0000 (20:17 +0200)]
Update browser-ui-test version

21 months agoAuto merge of #102787 - Dylan-DPC:rollup-fvbb4t9, r=Dylan-DPC
bors [Fri, 7 Oct 2022 17:37:39 +0000 (17:37 +0000)]
Auto merge of #102787 - Dylan-DPC:rollup-fvbb4t9, r=Dylan-DPC

Rollup of 6 pull requests

Successful merges:

 - #102300 (Use a macro to not have to copy-paste `ConstFnMutClosure::new(&mut fold, NeverShortCircuit::wrap_mut_2_imp)).0` everywhere)
 - #102475 (unsafe keyword: trait examples and unsafe_op_in_unsafe_fn update)
 - #102760 (Avoid repeated re-initialization of the BufReader buffer)
 - #102764 (Check `WhereClauseReferencesSelf` after all other object safety checks)
 - #102779 (Fix `type_of` ICE)
 - #102780 (run Miri CI when std::sys changes)

Failed merges:

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

21 months agoFix test
Gary Guo [Fri, 7 Oct 2022 17:01:17 +0000 (18:01 +0100)]
Fix test

21 months agoUpdate rustc-dev-guide
Josh Triplett [Fri, 7 Oct 2022 16:38:34 +0000 (17:38 +0100)]
Update rustc-dev-guide

- .gitattributes: Mark minified javascript as binary to filter greps
- fix very minor punctuation typo
- diagnostic structs: derive on enum (#1477)
- Update running tests with the new flags (#1476)
- Rename typeck to hir_analysis (#1475)
- fix typo and make paragraph consistent (#1474)
- Update about-this-guide.md
- Link to the correct page in "about this guide"
- Update r-a config suggestions
- don't refer to the compile-time interpreter as "Miri" (#1471)
- UPDATE - Diagnostic docs to reflect renamed traits and macros in rustc PR#101558
- Update mdbook and its extensions versions
- Remove unmaintained action
- Update some actions versions
- Fix some typos

Update motivated in large part by the most recent commit, to fix `git
grep`.

21 months agoRollup merge of #102780 - RalfJung:miri-lib-sys, r=Mark-Simulacrum
Dylan DPC [Fri, 7 Oct 2022 16:35:32 +0000 (22:05 +0530)]
Rollup merge of #102780 - RalfJung:miri-lib-sys, r=Mark-Simulacrum

run Miri CI when std::sys changes

r? `@Mark-Simulacrum`

21 months agoRollup merge of #102779 - TaKO8Ki:fix-type-of-ice-102768, r=fee1-dead
Dylan DPC [Fri, 7 Oct 2022 16:35:32 +0000 (22:05 +0530)]
Rollup merge of #102779 - TaKO8Ki:fix-type-of-ice-102768, r=fee1-dead

Fix `type_of` ICE

Fixes #102768

21 months agoRollup merge of #102764 - compiler-errors:issue-102762, r=jackh726
Dylan DPC [Fri, 7 Oct 2022 16:35:31 +0000 (22:05 +0530)]
Rollup merge of #102764 - compiler-errors:issue-102762, r=jackh726

Check `WhereClauseReferencesSelf` after all other object safety checks

This fixes the ICE because it causes us to detect another *non-lint* `MethodViolationCode` first, instead of breaking on `WhereClauseReferencesSelf`.

We could also approach this issue by instead returning a vector of *all* of the `MethodViolationCode`s, and just reporting the first one we see, but treating it as a hard error if we return both `WhereClauseReferencesSelf` and some other violation code -- let me know if this is desired.

Fixes #102762

21 months agoRollup merge of #102760 - saethlin:dont-reinit-buffer, r=Mark-Simulacrum
Dylan DPC [Fri, 7 Oct 2022 16:35:31 +0000 (22:05 +0530)]
Rollup merge of #102760 - saethlin:dont-reinit-buffer, r=Mark-Simulacrum

Avoid repeated re-initialization of the BufReader buffer

Fixes https://github.com/rust-lang/rust/issues/102727

We accidentally removed this in https://github.com/rust-lang/rust/pull/98748. It looks so redundant. But it isn't.

The default `Read::read_buf` will defensively initialize the whole buffer, if any of it is indicated to be uninitialized. In uses where reads from the wrapped `Read` impl completely fill the `BufReader`, `initialized` and `filled` are the same, and this extra member isn't required. But in the reported issue, the `BufReader` wraps a `Read` impl which will _never_ fill the whole buffer. So the default `Read::read_buf` implementation repeatedly re-initializes the extra space in the buffer.

This adds back the extra `initialized` member, which ensures that the default `Read::read_buf` only zero-initialized the buffer once, and I've tried to add a comment which explains this whole situation.

21 months agoRollup merge of #102475 - RalfJung:unsafe, r=dtolnay
Dylan DPC [Fri, 7 Oct 2022 16:35:30 +0000 (22:05 +0530)]
Rollup merge of #102475 - RalfJung:unsafe, r=dtolnay

unsafe keyword: trait examples and unsafe_op_in_unsafe_fn update

Having a safe `fn` in an `unsafe trait` vs an `unsafe fn` in a safe `trait` are pretty different situations, but the distinction is subtle and can confuse even seasoned Rust developers. So let's have explicit examples of both. I also removed the existing `unsafe trait` example since it was rather strange.

Also the `unsafe_op_in_unsafe_fn` lint can help disentangle the two sides of `unsafe`, so update the docs to account for that.

21 months agoRollup merge of #102300 - scottmcm:simpler-fold-closures, r=Mark-Simulacrum
Dylan DPC [Fri, 7 Oct 2022 16:35:29 +0000 (22:05 +0530)]
Rollup merge of #102300 - scottmcm:simpler-fold-closures, r=Mark-Simulacrum

Use a macro to not have to copy-paste `ConstFnMutClosure::new(&mut fold, NeverShortCircuit::wrap_mut_2_imp)).0` everywhere

Also use that macro to replace a bunch of places that had custom closure-wrappers.

+35 -114 sounds good to me.

21 months agoAllow transmutes between the same types after erasing lifetimes
Oli Scherer [Wed, 7 Sep 2022 07:51:11 +0000 (07:51 +0000)]
Allow transmutes between the same types after erasing lifetimes

21 months agoRemove tuple candidate, nothing special about it
Michael Goulet [Fri, 7 Oct 2022 16:19:21 +0000 (16:19 +0000)]
Remove tuple candidate, nothing special about it

21 months agomake const_err a hard error
Ralf Jung [Wed, 21 Sep 2022 11:05:20 +0000 (13:05 +0200)]
make const_err a hard error

21 months agoRemove `DefId` from some `SelectionCandidate` variants
Deadbeef [Fri, 7 Oct 2022 15:08:59 +0000 (15:08 +0000)]
Remove `DefId` from some `SelectionCandidate` variants

21 months agoAdd regression test for #102124
Hosshii [Fri, 7 Oct 2022 14:36:59 +0000 (23:36 +0900)]
Add regression test for #102124

21 months agoRewrite representability
Cameron Steffen [Mon, 15 Aug 2022 19:11:11 +0000 (14:11 -0500)]
Rewrite representability

21 months agoADD - implement IntoDiagnostic for thorin::Error wrapper
Jhonny Bill Mena [Tue, 4 Oct 2022 17:21:22 +0000 (13:21 -0400)]
ADD - implement IntoDiagnostic for thorin::Error wrapper

21 months agoAddress PR comments
Jhonny Bill Mena [Tue, 4 Oct 2022 17:25:13 +0000 (13:25 -0400)]
Address PR comments

- UPDATE - revert migration of logs

- UPDATE - use derive on LinkRlibError enum

- [Gardening] UPDATE - alphabetically sort fluent_messages

- UPDATE - use PathBuf and unify both AddNativeLibrary to use Display (which is what PathBuf uses when conforming to IntoDiagnosticArg)

- UPDATE - fluent messages sort after rebase

21 months agoADD - initial port of link.rs
Jhonny Bill Mena [Mon, 3 Oct 2022 03:21:15 +0000 (23:21 -0400)]
ADD - initial port of link.rs

21 months agoDELETE - unused error after PR# 100101 was merged
Jhonny Bill Mena [Tue, 13 Sep 2022 12:46:47 +0000 (08:46 -0400)]
DELETE - unused error after PR# 100101 was merged