mojave2
f404990eb0
improve AttrTokenStream
2023-09-04 20:07:28 +08:00
Urgau
eba5b44729
Add OnceHelp lint level (same as OnceNote, except for help)
2023-09-04 13:54:20 +02:00
bors
bf1e3f31f9
Auto merge of #115513 - Urgau:normalize-msg-after-translate, r=petrochenkov
...
Don't forget to normalize the translated message
This PR adds a missing call to `normalize_whitespace` after translating an label.
Fixes https://github.com/rust-lang/rust/issues/115498
2023-09-04 10:02:57 +00:00
bors
b14b0745ad
Auto merge of #115391 - saethlin:depkind-discrim, r=nnethercote
...
Encode DepKind as u16
The derived Encodable/Decodable impls serialize/deserialize as a varint, which results in a lot of code size around the encoding/decoding of these types which isn't justified: The full range of values here is rather small but doesn't quite fit in to a `u8`. Growing _all_ serialized `DepKind` to 2 bytes costs us on average 1% size in the incr comp dep graph, which I plan to recoup in https://github.com/rust-lang/rust/pull/110050 by taking advantage of the unused bits in all the serialized `DepKind`.
r? `@nnethercote`
2023-09-04 04:27:00 +00:00
bohan
7bad066f82
resolve: derive diag for undetermined macro resolution
2023-09-04 09:29:26 +08:00
Ben Kimock
9867023f4f
Encode DepKind as u16
2023-09-03 18:48:23 -04:00
bors
58e967a9cc
Auto merge of #115518 - matthiaskrgr:rollup-vksprou, r=matthiaskrgr
...
Rollup of 5 pull requests
Successful merges:
- #115279 (RangeFull: Remove parens around .. in documentation snippet)
- #115318 (Reference uplifted clippy lints' rustc name in the release notes)
- #115445 (remove some unused crate deps)
- #115489 (Use std::io::Error::is_interrupted everywhere)
- #115512 (Command::spawn: Fix STARTUPINFOW.cb being initialized with the address of size_of)
r? `@ghost`
`@rustbot` modify labels: rollup
2023-09-03 21:15:12 +00:00
Michael Goulet
8c667febbd
Don't ICE on associated type projection without feature gate
2023-09-03 19:43:58 +00:00
Matthias Krüger
d22043c27c
Rollup merge of #115445 - klensy:less-deps, r=Mark-Simulacrum
...
remove some unused crate deps
2023-09-03 21:38:42 +02:00
bors
21305f4d5f
Auto merge of #115270 - sebastiantoh:issue-105479, r=Nadrieril
...
Add note on non-exhaustiveness when matching on str and nested non-exhaustive enums
Fixes https://github.com/rust-lang/rust/issues/105479
r? `@Nadrieril`
2023-09-03 19:31:47 +00:00
Urgau
ec0975dd6b
Don't forget to normalize the translated message
2023-09-03 17:10:42 +02:00
Camille GILLOT
4a87a44451
Compute address space from previous file.
2023-09-03 15:02:47 +00:00
Camille GILLOT
548ba13265
Register the file while computing its start position.
2023-09-03 15:02:46 +00:00
Guillaume Gomez
3db7fc1481
Rollup merge of #115478 - gurry:115462-exprfield-no-warn, r=compiler-errors
...
Emit unused doc comment warnings for pat and expr fields
Fixes #115462
2023-09-03 15:42:11 +02:00
Camille GILLOT
258ace613d
Use relative positions inside a SourceFile.
2023-09-03 12:56:10 +00:00
Sebastian Toh
d87b87d10e
Improve clarity of diagnostic message on non-exhaustive matches
2023-09-03 19:55:11 +08:00
bors
53a03978a7
Auto merge of #115361 - compiler-errors:param, r=cjgillot
...
Don't manually compute param indices when adding implicit `Sized` and `ConstParamHasTy`
We can just use resolve_bound_vars to compute these indices faithfully.
This also makes the code easier to support where clauses on `non_lifetime_binders` (like `where for<T: Debug> ...`, etc, which I've got a [WIP implementation of](https://github.com/rust-lang/rust/compare/master...compiler-errors:rust:non-lifetime-binder-where-clauses )).
r? `@cjgillot`
2023-09-03 11:12:20 +00:00
bors
7cc5ac267f
Auto merge of #115470 - ericmarkmartin:stable-prov, r=oli-obk
...
add stable provenance
r? `@spastorino`
implements rust-lang/project-stable-mir#22
2023-09-03 07:38:55 +00:00
Martin Nordholts
789451b43a
Allow large_assignments for Box/Arc/Rc initialization
...
Does the `stop linting in box/arc initialization` task of 83518.
2023-09-03 08:15:25 +02:00
Martin Nordholts
04d81ba153
Make .rmeta file in dep-info have correct name (lib prefix)
...
Since `filename_for_metadata()` and
`OutputFilenames::path(OutputType::Metadata)` had different logic for
the name of the metadata file, the `.d` file contained a file name
different from the actual name used. Share the logic to fix the
out-of-sync name.
Closes 68839.
2023-09-03 07:14:12 +02:00
bors
33e796bbe1
Auto merge of #115441 - catandcoder:master, r=workingjubilee
...
fix the repetitive word
2023-09-03 03:37:27 +00:00
Gurinder Singh
a0a71732f9
Fix code that now emits unused doc comment warning for expr field
2023-09-03 08:38:17 +05:30
Gurinder Singh
10f4917568
Emit unused doc comment warnings for pat and expr fields
2023-09-03 08:21:18 +05:30
Jason Newcomb
f686bd8949
Take &mut Results in ResultsVisitor
2023-09-02 19:35:51 -04:00
bors
9229b1eab4
Auto merge of #115429 - compiler-errors:assoc-ct-lt-fallthrough, r=cjgillot
...
Fall through when resolving elided assoc const lifetimes
`@QuineDot` makes a good point in https://github.com/rust-lang/rust/issues/115010#issuecomment-1702127634 that we probably should not accept *more* code due to #115011 even though that code will eventually become a forbid-warning in a few versions (https://github.com/rust-lang/rust/issues/115010#issuecomment-1701598067 ).
Fall through when walking thru the `AnonymousWarnToStatic` (renamed to `AnonymousWarn`) rib so that we can resolve as a fresh lifetime like we did before.
2023-09-02 10:55:49 +00:00
bors
ad8f601ca2
Auto merge of #115469 - matthiaskrgr:rollup-25ybx39, r=matthiaskrgr
...
Rollup of 7 pull requests
Successful merges:
- #114349 (rustc_llvm: Link to `zlib` on dragonfly and solaris)
- #114845 (Add alignment to the NPO guarantee)
- #115427 (kmc-solid: Fix `is_interrupted`)
- #115443 (feat(std): Stabilize 'os_str_bytes' feature)
- #115444 (Create a SMIR visitor)
- #115449 (Const-stabilize `is_ascii`)
- #115456 (Add spastorino on vacation)
r? `@ghost`
`@rustbot` modify labels: rollup
2023-09-02 06:38:58 +00:00
John Kåre Alsaker
a3ad045ea4
Rename Freeze to FreezeLock
2023-09-02 08:14:06 +02:00
John Kåre Alsaker
50f0d666d3
Add some comments
2023-09-02 08:13:07 +02:00
John Kåre Alsaker
25884ec9be
Use RwLock for Freeze
2023-09-02 08:13:07 +02:00
John Kåre Alsaker
ac54d49572
Freeze Definitions earlier
2023-09-02 08:13:07 +02:00
John Kåre Alsaker
6881eed8f6
Don't hold the definitions' lock across index_hir
2023-09-02 08:13:07 +02:00
John Kåre Alsaker
0c96a9260b
Add Freeze type and use it to store Definitions
2023-09-02 08:13:03 +02:00
Eric Mark Martin
cb7d020fb6
add stable provenance
2023-09-02 01:53:06 -04:00
Matthias Krüger
cdc8aa3843
Rollup merge of #115444 - oli-obk:smir_visitor, r=spastorino
...
Create a SMIR visitor
r? ``@spastorino``
Doesn't have tests or examples yet, but I think we could land it and implement it for the rest of the types.
2023-09-02 07:48:23 +02:00
Matthias Krüger
4e2231803b
Rollup merge of #114349 - inferiorhumanorgans:dragonfly-link-libz, r=cuviper
...
rustc_llvm: Link to `zlib` on dragonfly and solaris
On native builds `llvm-config` picks up `zlib` and this gets pased into
the rust build tools, but on cross builds `llvm-config` is explicitly
ignored as it contains information for the host system and cannot be
trusted to be accurate for the target system.
Both DragonFly and Solaris contain `zlib` in the base system, so this is
both a safe assumption and required for a successful cross build unless
`zlib` support is disabled in LLVM.
This is more or less in the same vein as rust-lang#75713 and rust-lang#75655.
2023-09-02 07:48:21 +02:00
Michael Goulet
07fc644132
Do not require associated types with Self: Sized to uphold bounds when confirming object candidate
2023-09-02 05:08:38 +00:00
Michael Goulet
7a6b52bf0d
RPITITs are considered object-safe, they're always on Self:Sized methods
2023-09-02 04:58:23 +00:00
bors
1fb6947abc
Auto merge of #115286 - saethlin:detangler, r=petrochenkov
...
Skip rendering metadata strings from include_str!/include_bytes!
The const rendering code in rustdoc completely ignores consts from expansions, but the compiler was rendering all consts. So some consts (namely those from `include_bytes!`) were rendered then ignored.
Most of the diff here is from moving `print_const_expr` from rustdoc into `rustc_hir_pretty` so that it can be used in rustdoc and when building rmeta files.
2023-09-02 04:53:19 +00:00
bors
9dc11a13fa
Auto merge of #115422 - Zoxc:cache-once-lock, r=cjgillot
...
Use `OnceLock` for `SingleCache`
This uses `OnceLock` for `SingleCache` instead of `Lock<Option<T>>` so lookups are lock-free.
r? `@cjgillot`
2023-09-02 03:06:11 +00:00
cui fliter
42e550781c
Signed-off-by: cui fliter <imcusg@gmail.com>
...
remove the repetitive word
Signed-off-by: cui fliter <imcusg@gmail.com >
2023-09-02 07:40:44 +08:00
Daniel Paoliello
06890774ab
Deduplicate inlined function debug info, but create a new lexical scope to child subsequent scopes and variables from colliding
2023-09-01 14:27:21 -07:00
Ben Kimock
159ad5fb0d
Reuse const rendering from rustdoc in rmeta encoding
2023-09-01 17:22:48 -04:00
Matthias Krüger
ead5f80deb
Rollup merge of #115447 - LegNeato:patch-2, r=oli-obk
...
Add comment so pub items are not removed
As suggested in https://github.com/rust-lang/rust/pull/115393 , add a comment so someone doesn't clean these up.
2023-09-01 21:41:41 +02:00
Matthias Krüger
db450d2981
Rollup merge of #115446 - klensy:fixup-stable-version, r=cuviper
...
fix version for abi_thiscall to 1.73.0, which was forgotten to change when stabilized and (later) moved to beta
See:
https://github.com/rust-lang/rust/pull/114562#issuecomment-1669424749
https://github.com/rust-lang/rust/pull/115056#issuecomment-1686316608
https://rust-lang.zulipchat.com/#narrow/stream/241545-t-release/topic/1.2E72.2E0/near/387695644
Should be backported to beta too.
2023-09-01 21:41:40 +02:00
Matthias Krüger
cf24a9fdf6
Rollup merge of #115425 - thechampagne:master, r=oli-obk
...
remove unnecessary heap allocation
2023-09-01 21:41:40 +02:00
Matthias Krüger
888dc2e3b0
Rollup merge of #115424 - notriddle:notriddle/issue-106413, r=oli-obk
...
diagnostics: avoid wrong `unused_parens` on `x as (T) < y`
Fixes #106413
Fixes #80636
2023-09-01 21:41:39 +02:00
Matthias Krüger
db6ae0721b
Rollup merge of #115411 - RalfJung:miri-abi, r=oli-obk
...
miri ABI check: fix handling of 1-ZST; don't accept sign differences
r? `@oli-obk`
2023-09-01 21:41:39 +02:00
Michael Goulet
c5d0f6c05c
Don't manually walk through param indices when adding implicit Sized and ConstParamHasTy
2023-09-01 19:26:55 +00:00
Christian Legnitto
6e6031e094
Add comment so pub items are not removed
...
As suggested in https://github.com/rust-lang/rust/pull/115393 , add a comment so someone doesn't clean these up.
2023-09-01 13:22:03 -04:00
klensy
355ba433ee
fix version for abi_thiscall to 1.73.0, which was forgotten to change when stabilized
2023-09-01 19:46:09 +03:00