Commit Graph

197766 Commits

Author SHA1 Message Date
akabinds
1b54ad0585 added improved diagnostic for a function defined with an invalid qualifier 2022-08-18 16:14:04 -05:00
bors
0b79f758c9 Auto merge of #98807 - cbeuw:derived-obligation, r=compiler-errors
Reword "Required because of the requirements on the impl of ..."

Rephrases the awkward "Required because of the requirements on the impl of `{trait}` for `{type}`" to "required for `{type}` to implement `{trait}`"
2022-08-18 21:12:05 +00:00
Andy Wang
84a199369b
Reword "Required because of the requirements on the impl of ..." 2022-08-18 21:08:08 +01:00
5225225
09ea9f0a87 Add diagnostic translation lints to crates that don't emit them 2022-08-18 19:29:02 +01:00
Jhonny Bill Mena
05ed13b476 ADD - diagnostic lints to type_ir
Module is completed because it doesn’t have any diagnostics
2022-08-18 13:33:03 -04:00
Guillaume Gomez
0df1c69023 Update rustdoc test 2022-08-18 17:47:40 +02:00
bors
8064a49508 Auto merge of #99860 - oli-obk:revert_97346, r=pnkfelix
Revert "Rollup merge of #97346 - JohnTitor:remove-back-compat-hacks, …

…r=oli-obk"

This reverts commit c703d11dcc, reversing
changes made to 64eb9ab869.

it didn't apply cleanly, so now it works the same for RPIT and for TAIT instead of just working for RPIT, but we should keep those in sync anyway. It also exposed a TAIT bug (see the feature gated test that now ICEs).

r? `@pnkfelix`

fixes #99536
2022-08-18 15:41:30 +00:00
Guillaume Gomez
fe6956b7be Fix item-info display 2022-08-18 16:16:34 +02:00
Guillaume Gomez
09396fc30a Remove unused CSS rule 2022-08-18 16:14:46 +02:00
Guillaume Gomez
9898793323 Update existing rustdoc-gui tests and add a new one 2022-08-18 16:14:46 +02:00
Guillaume Gomez
2d968a142f Simplify rustdoc themes by relying more on CSS variables 2022-08-18 16:07:53 +02:00
Pietro Albini
00c8306cdb
import license changes 2022-08-18 16:07:04 +02:00
Pietro Albini
a0c08c68c7
cleanup .reuse/dep5 2022-08-18 16:07:02 +02:00
Pietro Albini
88e3d752e4
import the debian/copyright file from debian
Co-Authored-By: Angus Lees <gus@inodes.org>
Co-Authored-By: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Co-Authored-By: Hiroaki Nakamura <hnakamur@gmail.com>
Co-Authored-By: Jordan Justen <jljusten@gmail.com>
Co-Authored-By: Luca Bruno <lucab@debian.org>
Co-Authored-By: Sylvestre Ledru <sylvestre@debian.org>
Co-Authored-By: Ximin Luo <infinity0@debian.org>
2022-08-18 15:46:09 +02:00
bors
bb99e6fdd9 Auto merge of #100682 - RalfJung:miri, r=RalfJung
update Miri

Fixes https://github.com/rust-lang/rust/issues/100614
r? `@ghost`
2022-08-18 12:56:21 +00:00
Jhonny Bill Mena
af4f66ef93 ADD - ExpectedUsedSymbol diagnostic to port used() diagnostic 2022-08-18 08:18:26 -04:00
Xiretza
295457192d fluent: fix slug name for borrowck::generic_does_not_live_long_enough 2022-08-18 12:34:11 +02:00
Xiretza
00fec76ab5 tidy: check fluent files for style 2022-08-18 12:34:11 +02:00
bors
361c599fee Auto merge of #98655 - nnethercote:dont-derive-PartialEq-ne, r=dtolnay
Don't derive `PartialEq::ne`.

Currently we skip deriving `PartialEq::ne` for C-like (fieldless) enums
and empty structs, thus reyling on the default `ne`. This behaviour is
unnecessarily conservative, because the `PartialEq` docs say this:

> Implementations must ensure that eq and ne are consistent with each other:
>
> `a != b` if and only if `!(a == b)` (ensured by the default
> implementation).

This means that the default implementation (`!(a == b)`) is always good
enough. So this commit changes things such that `ne` is never derived.

The motivation for this change is that not deriving `ne` reduces compile
times and binary sizes.

Observable behaviour may change if a user has defined a type `A` with an
inconsistent `PartialEq` and then defines a type `B` that contains an
`A` and also derives `PartialEq`. Such code is already buggy and
preserving bug-for-bug compatibility isn't necessary.

Two side-effects of the change:
- There is only one error message produced for types where `PartialEq`
  cannot be derived, instead of two.
- For coverage reports, some warnings about generated `ne` methods not
  being executed have disappeared.

Both side-effects seem fine, and possibly preferable.
2022-08-18 10:11:11 +00:00
bors
f241c0c43d Auto merge of #100708 - matthiaskrgr:rollup-vl0olnj, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #97962 (Make must_not_suspend lint see through references when drop tracking is enabled)
 - #99966 (avoid assertion failures in try_to_scalar_int)
 - #100637 (Improving Fuchsia rustc support documentation)
 - #100643 (Point at a type parameter shadowing another type)
 - #100651 (Migrations for rustc_expand transcribe.rs)
 - #100669 (Attribute cleanups)
 - #100670 (Fix documentation of rustc_parse::parser::Parser::parse_stmt_without_recovery)
 - #100674 (Migrate lint reports in typeck::check_unused to LintDiagnostic)
 - #100688 (`ty::Error` does not match other types for region constraints)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-08-18 07:09:06 +00:00
Chris Denton
b631ca0c2f
Windows: Load synch functions together
Attempt to load all the required sync functions and fail if any one of them fails.

This reintroduces a macro for optional loading of functions but keeps it separate from the fallback macro rather than having that do two different jobs.
2022-08-18 07:39:14 +01:00
Matthias Krüger
c7a4942588
Rollup merge of #100688 - compiler-errors:issue-100684, r=wesleywiser
`ty::Error` does not match other types for region constraints

Fixes #100684
2022-08-18 05:10:51 +02:00
Matthias Krüger
3de034d401
Rollup merge of #100674 - PragmaTwice:mig-typeck-unused-crate-diag, r=davidtwco
Migrate lint reports in typeck::check_unused to LintDiagnostic

In this PR, I migrate two lint reports in `typeck::check_unused` by `LintDiagnostic`, all of which is about extern crates.

```@rustbot``` label +A-translation
r? rust-lang/diagnostics
2022-08-18 05:10:50 +02:00
Matthias Krüger
5548e585c1
Rollup merge of #100670 - Xiretza:parser-stmt-force-collect-docs, r=davidtwco
Fix documentation of rustc_parse::parser::Parser::parse_stmt_without_recovery

Something seems to have gotten out of sync during the creation of #81177, where both the argument and comment were introduced.
2022-08-18 05:10:49 +02:00
Matthias Krüger
3e057d1512
Rollup merge of #100669 - nnethercote:attribute-cleanups, r=spastorino
Attribute cleanups

r? `@ghost`
2022-08-18 05:10:48 +02:00
Matthias Krüger
8b180ed3c0
Rollup merge of #100651 - nidnogg:diagnostics_migration_expand_transcribe, r=davidtwco
Migrations for rustc_expand transcribe.rs

This PR includes some migrations to the new diagnostics API for the `rustc_expand` module.
r? ```@davidtwco```
2022-08-18 05:10:47 +02:00
Matthias Krüger
b295639f14
Rollup merge of #100643 - TaKO8Ki:point-at-type-parameter-shadowing-another-type, r=estebank
Point at a type parameter shadowing another type

This patch fixes a part of #97459.
2022-08-18 05:10:46 +02:00
Matthias Krüger
795e55f1e1
Rollup merge of #100637 - andrewpollack:fuchsia-docs-adjustments, r=tmandry
Improving Fuchsia rustc support documentation

* Adjusting `package/meta/package` to fit current schema
* Adding repository server step
* Adjusting step to give default repository
* Adding "recreate" step for easier step following
2022-08-18 05:10:45 +02:00
Matthias Krüger
092f4600bb
Rollup merge of #99966 - RalfJung:try-dont-panic, r=lcnr
avoid assertion failures in try_to_scalar_int

Given that this is called `try_to_scalar_int`, we probably shouldn't `assert_int` here. Similarly `try_to_bits` also doesn't `assert!` that the size is correct.

Also add some `track_caller` for debugging, while we are at it.

r? ```@oli-obk```
2022-08-18 05:10:42 +02:00
Matthias Krüger
370bf1543d
Rollup merge of #97962 - eholk:drop-tracking-must-not-suspend, r=cjgillot
Make must_not_suspend lint see through references when drop tracking is enabled

See #97333.

With drop tracking enabled, sometimes values that were previously linted are now considered dropped and not linted. This change makes must_not_suspend traverse through references to still catch these values.

Unfortunately, this leads to duplicate warnings in some cases (e.g. [dedup.rs](9a74608543/src/test/ui/lint/must_not_suspend/dedup.rs (L4))), so we only use the new behavior when drop tracking is enabled.

cc ``@guswynn``
2022-08-18 05:10:41 +02:00
Camille GILLOT
72acd94117 Add const-generics test. 2022-08-17 21:50:59 +02:00
Scott McMurray
5145c97087 Add LLVM15-specific codegen test for try/?s that now optimize away
These still generated a bunch of code back in Rust 1.63 (<https://rust.godbolt.org/z/z31P8h6rz>), but with LLVM 15 merged they no longer do 🎉
2022-08-17 12:09:59 -07:00
Michael Goulet
64bd8c1dc4 Make same_type_modulo_infer a proper TypeRelation 2022-08-17 19:02:55 +00:00
Camille GILLOT
be2641a61f Fortify check for const generics. 2022-08-17 20:22:52 +02:00
Camille GILLOT
86645c9cf7 Ignore substs when checking inlining history. 2022-08-17 19:25:09 +02:00
Michael Goulet
fc7fc0fae5 ty::Error does not match other types for region constraints 2022-08-17 17:23:52 +00:00
Xiretza
e8499cfadc Migrate "invalid variable declaration" errors to SessionDiagnostic 2022-08-17 19:08:37 +02:00
nidnogg
a468f13162 Hotfix for duplicated slug name on VarStillRepeating struct 2022-08-17 13:13:07 -03:00
bors
9c20b2a8cc Auto merge of #100677 - matthiaskrgr:rollup-au41ho1, r=matthiaskrgr
Rollup of 15 pull requests

Successful merges:

 - #99474 (Rustdoc json tests: New `@hasexact` test command)
 - #99972 (interpret: only consider 1-ZST when searching for receiver)
 - #100018 (Clean up `LitKind`)
 - #100379 (triagebot: add translation-related mention groups)
 - #100389 (Do not report cycle error when inferring return type for suggestion)
 - #100489 (`is_knowable` use `Result` instead of `Option`)
 - #100532 (unwind: don't build dependency when building for Miri)
 - #100608 (needless separation of impl blocks)
 - #100621 (Pass +atomics-32 feature for {arm,thumb}v4t-none-eabi)
 - #100646 (Migrate emoji identifier diagnostics to `SessionDiagnostic` in rustc_interface)
 - #100652 (Remove deferred sized checks (make them eager))
 - #100655 (Update books)
 - #100656 (Update cargo)
 - #100660 (Fixed a few documentation errors)
 - #100661 (Fixed a few documentation errors)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-08-17 14:49:05 +00:00
nidnogg
caab20c431 Moved structs to rustc_expand::errors, added several more migrations, fixed slug name 2022-08-17 11:20:37 -03:00
nidnogg
c6f9a9c410 Moved structs to rustc_expand::errors, added several more migrations, fixed slug name 2022-08-17 11:18:19 -03:00
PragmaTwice
9efe979511 remove #[primary_span] 2022-08-17 22:08:06 +08:00
Ralf Jung
2c9baf73f3 update Miri 2022-08-17 09:09:33 -04:00
PragmaTwice
b704843c44 fix test file 2022-08-17 21:05:21 +08:00
Twice
52418d661b
use suggestion_short in LintDiagnostic
Co-authored-by: David Wood <agile.lion3441@fuligin.ink>
2022-08-17 20:45:18 +08:00
Christopher Durham
944c6b6d76 New ui tests for new soft feature gates 2022-08-17 06:59:46 -05:00
Christopher Durham
767239f740 Reenable early feature-gates as future-compat warnings 2022-08-17 06:53:18 -05:00
Christopher Durham
e9e46c95ce Don't treat stashed warnings as errors 2022-08-17 06:07:33 -05:00
Matthias Krüger
1199dbdcf5
Rollup merge of #100661 - PunkyMunky64:patch-1, r=thomcc
Fixed a few documentation errors

Quick pull request; IEEE-754, not IEEE-745. May save someone a quick second some time.
2022-08-17 12:33:02 +02:00
Matthias Krüger
bd8aa6dffe
Rollup merge of #100660 - PunkyMunky64:patch-2, r=thomcc
Fixed a few documentation errors

Quick pull request; IEEE-754, not IEEE-745. May save someone a quick second some time.
2022-08-17 12:33:01 +02:00