Commit Graph

198090 Commits

Author SHA1 Message Date
5225225
09ea9f0a87 Add diagnostic translation lints to crates that don't emit them 2022-08-18 19:29:02 +01:00
bjorn3
6421427b74 Move Span lowering from debuginfo finalization to codegen
This removes the dependency on TyCtxt from the debuginfo finalization
code.
2022-08-18 18:19:40 +00:00
bjorn3
0534a555cc Make line_program_add_file a DebugContext method 2022-08-18 17:48:22 +00: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
bjorn3
1e57774011 Move set_function_span earlier 2022-08-18 17:23:36 +00:00
bjorn3
01be0ddacf Move FunctionDebugContext creation to codegen_fn 2022-08-18 17:17:33 +00:00
bjorn3
dbf5457308 Introduce FunctionDebugContext
This will make it easier to move TyCtxt requiring operations before clif
ir compilation.
2022-08-18 17:11:41 +00:00
bjorn3
312563f3c4 Use walk_chain for function span too
This is a correctness fix
2022-08-18 15:58:22 +00: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
bjorn3
259b21fd46 Remove TyCtxt from DebugContext
And explicitly thread it through everwhere it is needed.
2022-08-18 15:25:52 +00:00
bjorn3
e5493a5ea2 Remove Instance param of DebugContext::define_function 2022-08-18 15:25:47 +00:00
bjorn3
a49416da6d Remove stub local debuginfo implementation
It isn't actually wired up and temporarily removing it will make changes
to the debuginfo generation code much simpler.
2022-08-18 15:14:04 +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
bjorn3
5fc1366dfa Register debuginfo for lazy jit shim 2022-08-18 12:55:44 +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
Guillaume Gomez
d3d9e223e2 Update rustdoc-json test files 2022-08-18 11:00:21 +02:00
Guillaume Gomez
57c85bd97d Remove need to give JSON file path 2022-08-18 10:48:06 +02: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
lcnr
736288f221 dedup some code 2022-08-17 18:14:25 +02:00
nidnogg
a468f13162 Hotfix for duplicated slug name on VarStillRepeating struct 2022-08-17 13:13:07 -03:00
bjorn3
4dac65fcbd
Merge pull request #1265 from afonso360/stack_store
Use `stack_store` instead of `stack_addr`+`store` when building structs
2022-08-17 16:51:02 +02: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