Commit Graph

27652 Commits

Author SHA1 Message Date
ezekiel
13f17e1a93 replace doc occurrences of ItemLikeVisitor
ItemLikeVisitor was removed, and the visit strategy was moved to `rustc_hir::intravisit`
2023-09-05 22:40:36 +02:00
Matthias Krüger
6f31d00244
Rollup merge of #115563 - krasimirgg:llvm-18-bitcodereader, r=nikic
llvm-wrapper: adapt for LLVM API change

No functional changes intended.

Adapts the wrapper for bbe8cd1333.

Found by our experimental rust + llvm @ HEAD CI: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/22055#018a6495-8dd9-41df-9381-5e7b0009ce0a/274-575
2023-09-05 15:16:51 +02:00
Matthias Krüger
9381e5bf58
Rollup merge of #115540 - cjgillot:custom-debuginfo, r=oli-obk
Support debuginfo for custom MIR.
2023-09-05 15:16:51 +02:00
Matthias Krüger
09974dfc69
Rollup merge of #115536 - RalfJung:interpreter-privacy, r=oli-obk
interpret: make MemPlace, Place, Operand types private to the interpreter

Outside the interpreter, only the typed versions should be used.
2023-09-05 15:16:50 +02:00
Matthias Krüger
a9336b6705
Rollup merge of #115523 - mojave2:improve-tokenstream, r=petrochenkov
improve `AttrTokenStream`

Improve the performance of `AttrTokenStream::to_tokenstream` method
2023-09-05 15:16:50 +02:00
Krasimir Georgiev
bdfa08a345 llvm-wrapper: adapt for LLVM API change
No functional changes intended.

Adapts the wrapper for bbe8cd1333.

Found by our experimental rust + llvm @ HEAD CI: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/22055#018a6495-8dd9-41df-9381-5e7b0009ce0a/274-575
2023-09-05 10:04:25 +00:00
bors
8cfaf70c32 Auto merge of #115553 - matthiaskrgr:rollup-c0045hz, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #115353 (Emit error instead of ICE when optimized MIR is missing)
 - #115488 (Take `&mut Results` in `ResultsVisitor`)
 - #115492 (Allow `large_assignments` for Box/Arc/Rc initialization)
 - #115519 (Don't ICE on associated type projection without feature gate in new solver)
 - #115534 (Expose more information with DefId in smir)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-09-05 05:34:18 +00:00
Matthias Krüger
03853d59ce
Rollup merge of #115534 - ouz-a:smir_def, r=oli-obk
Expose more information with DefId in smir

Currently `Debug` for `DefId` doesn't provide enough information, this changes so that we get `usize` of the `DefId` and the name of it.

r? `@oli-obk`
2023-09-05 07:15:17 +02:00
Matthias Krüger
f5e6aa3c4a
Rollup merge of #115519 - compiler-errors:next-solver-assoc-ice, r=lcnr
Don't ICE on associated type projection without feature gate in new solver

Self-explanatory, we should avoid ICEs when the feature gate is not enabled. Continue to ICE when the feature gate *is* enabled, though.

Fixes #115500
2023-09-05 07:15:16 +02:00
Matthias Krüger
6f180ea954
Rollup merge of #115492 - Enselic:large-box-move, r=oli-obk
Allow `large_assignments` for Box/Arc/Rc initialization

Does the `stop linting in box/arc initialization` task of #83518.

r? `@oli-obk` who is E-mentor.
2023-09-05 07:15:16 +02:00
Matthias Krüger
e9d15ec2cc
Rollup merge of #115488 - Jarcho:mut_result_visitor, r=oli-obk
Take `&mut Results` in `ResultsVisitor`

This fixes a small oversight from #108293.
2023-09-05 07:15:15 +02:00
Matthias Krüger
a73c663ec4
Rollup merge of #115353 - Enselic:no-optimized-mir, r=oli-obk
Emit error instead of ICE when optimized MIR is missing

Closes #51388
2023-09-05 07:15:15 +02:00
bors
626a6ab93f Auto merge of #115531 - RalfJung:read_via_copy, r=scottmcm
read_via_copy: don't prematurely optimize away the read

Always do the read to ensure consistent UB error messages in const-eval/Miri.

r? `@scottmcm`
2023-09-05 03:45:17 +00:00
bors
9c609ae158 Auto merge of #115467 - compiler-errors:assoc-ty-object-safety, r=oli-obk
Do not require associated types with Self: Sized to uphold bounds when confirming object candidate

RPITITs and associated types that have `Self: Sized` bounds are opted out of the `dyn Trait` well-formedness check that happens during confirmation. This ensures that we can actually *use* `dyn Trait`s that have associated types that, e.g., have GATs and RPITITs and other naughty things as long as those are opted-out of object safety via a `Self: Sized` bound.

Fixes #115464

This seems like a natural part of https://github.com/rust-lang/rust/pull/112319#issuecomment-1592574451, and I don't think needs re-litigation.

r? `@oli-obk`
2023-09-05 01:09:48 +00:00
Ralf Jung
7093903ba7 read_via_copy: don't prematurely optimize away the read 2023-09-04 18:27:34 +02:00
ouz-a
56d10a883e provide more useful info for DefId Debug 2023-09-04 19:13:43 +03:00
Ralf Jung
fa5f13775a interpret: make MemPlace, Place, Operand types private to the interpreter 2023-09-04 17:53:38 +02:00
Urgau
efbe445ba7 Add help to allow lint for the implied by suggestion 2023-09-04 14:21:38 +02:00
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
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
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
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
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
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
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