]> git.lizzy.rs Git - rust.git/log
rust.git
22 months agoremove Clean trait implementation for hir::PolyTraitRef
Guillaume Gomez [Sat, 6 Aug 2022 09:54:54 +0000 (11:54 +0200)]
remove Clean trait implementation for hir::PolyTraitRef

22 months agoremove Clean trait implementation for hir::GenericBound
Guillaume Gomez [Sat, 6 Aug 2022 09:52:27 +0000 (11:52 +0200)]
remove Clean trait implementation for hir::GenericBound

22 months agoremove Clean trait implementation for hir::TraitItem
Guillaume Gomez [Fri, 5 Aug 2022 10:08:32 +0000 (12:08 +0200)]
remove Clean trait implementation for hir::TraitItem

22 months agoremove Clean trait implementation for hir::PolyTraitRef
Guillaume Gomez [Fri, 5 Aug 2022 10:01:30 +0000 (12:01 +0200)]
remove Clean trait implementation for hir::PolyTraitRef

22 months agoremove Clean trait implementation for hir::TraitRef
Guillaume Gomez [Thu, 4 Aug 2022 09:43:50 +0000 (11:43 +0200)]
remove Clean trait implementation for hir::TraitRef

22 months agoremove Clean trait implementation for hir::FnRetTy
Guillaume Gomez [Thu, 4 Aug 2022 09:32:45 +0000 (11:32 +0200)]
remove Clean trait implementation for hir::FnRetTy

22 months agoAuto merge of #100120 - matthiaskrgr:rollup-g6ycykq, r=matthiaskrgr
bors [Thu, 4 Aug 2022 03:52:29 +0000 (03:52 +0000)]
Auto merge of #100120 - matthiaskrgr:rollup-g6ycykq, r=matthiaskrgr

Rollup of 6 pull requests

Successful merges:

 - #98771 (Add support for link-flavor rust-lld for iOS, tvOS and watchOS)
 - #98835 (relate `closure_substs.parent_substs()` to parent fn in NLL)
 - #99746 (Use `TraitEngine` in more places that don't specifically need `FulfillmentContext::new_in_snapshot`)
 - #99786 (Recover from C++ style `enum struct`)
 - #99795 (Delay a bug when failed to normalize trait ref during specialization)
 - #100029 (Prevent ICE for `doc_alias` on match arm, statement, expression)

Failed merges:

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

22 months agoAuto merge of #100123 - matthiaskrgr:rollup-aylwvyc, r=matthiaskrgr
bors [Thu, 4 Aug 2022 01:10:08 +0000 (01:10 +0000)]
Auto merge of #100123 - matthiaskrgr:rollup-aylwvyc, r=matthiaskrgr

Rollup of 9 pull requests

Successful merges:

 - #98877 (Set llvm configs when building lld)
 - #100068 (Fix backwards-compatibility check for tests with `+whole-archive`)
 - #100083 (rustdoc: use a more compact encoding for source-files.js)
 - #100102 (Fix typo)
 - #100104 (Remove more Clean trait implementations)
 - #100105 (Add regression test for #90871)
 - #100107 (fix trailing whitespace in error message)
 - #100111 (Provide suggestion on missing `let` in binding statement)
 - #100119 (FilesTimes support does not build for ESP-IDF)

Failed merges:

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

22 months agoAuto merge of #100065 - ehuss:update-cargo, r=ehuss
bors [Wed, 3 Aug 2022 22:16:07 +0000 (22:16 +0000)]
Auto merge of #100065 - ehuss:update-cargo, r=ehuss

Update cargo, rls

14 commits in 85b500ccad8cd0b63995fd94a03ddd4b83f7905b..4fd148c47e733770c537efac5220744945d572ef
2022-07-24 21:10:46 +0000 to 2022-08-03 15:03:52 +0000
- Revert "Drop check for mingw32-make." (rust-lang/cargo#10934)
- Add reasons to all ignored tests. (rust-lang/cargo#10929)
- Grammar fixup unused patch message (rust-lang/cargo#10933)
- Always allow hg to be missing on CI. (rust-lang/cargo#10931)
- Fix formats_source test requiring rustfmt. (rust-lang/cargo#10918)
- Disable scrape_examples_complex_reverse_dependencies (rust-lang/cargo#10921)
- Contrib: Add docs on the rustbot ready command (rust-lang/cargo#10916)
- Support for negative --jobs parameter, counting backwards from max CPUs (rust-lang/cargo#10844)
- Add requirements to cargo_test. (rust-lang/cargo#9892)
- Contrib: Document submodule update process (rust-lang/cargo#10913)
- Contrib: Add docs on how to use crater (rust-lang/cargo#10912)
- Contrib: Document new-release process (rust-lang/cargo#10914)
- Override to resolver=1 in published package (rust-lang/cargo#10911)
- fix(add): Update the lock file (rust-lang/cargo#10902)

1 commits in fcf1f94c9ab2acc18cfd4368a4aeb38e77da9649..4d8b0a19986a4daab37287a5b5fe2da0775d1873
2022-07-14 17:19:11 +0200 to 2022-08-02 22:34:34 -0400
- Update cargo (rust-lang/rls#1782)

22 months agoRollup merge of #100119 - ivmarkov:master, r=joshtriplett
Matthias Krüger [Wed, 3 Aug 2022 20:30:50 +0000 (22:30 +0200)]
Rollup merge of #100119 - ivmarkov:master, r=joshtriplett

FilesTimes support does not build for ESP-IDF

Commit https://github.com/rust-lang/rust/commit/1f5d8d49eb6111931091f700d07518cd2b80bc18 broke STD for `target_os = "espidf"`.

In future, we might come up with something more sophisticated (as in using the `utime` function which *is* available on the ESP-IDF platform), but for now we are treating ESP-IDF just like `Redox` in that the new API fails at runtime. Most important for us ATM is to restore successful compilation of STD on our platform.

22 months agoRollup merge of #100111 - estebank:missing-let, r=compiler-errors
Matthias Krüger [Wed, 3 Aug 2022 20:30:49 +0000 (22:30 +0200)]
Rollup merge of #100111 - estebank:missing-let, r=compiler-errors

Provide suggestion on missing `let` in binding statement

Fix #78907.

Fallout from the type ascription syntax.

22 months agoRollup merge of #100107 - klensy:tr-w, r=compiler-errors
Matthias Krüger [Wed, 3 Aug 2022 20:30:49 +0000 (22:30 +0200)]
Rollup merge of #100107 - klensy:tr-w, r=compiler-errors

fix trailing whitespace in error message

22 months agoRollup merge of #100105 - TaKO8Ki:add-regression-test-for-90871, r=compiler-errors
Matthias Krüger [Wed, 3 Aug 2022 20:30:48 +0000 (22:30 +0200)]
Rollup merge of #100105 - TaKO8Ki:add-regression-test-for-90871, r=compiler-errors

Add regression test for #90871

closes #90871

22 months agoRollup merge of #100104 - GuillaumeGomez:rm-clean-impls, r=Dylan-DPC
Matthias Krüger [Wed, 3 Aug 2022 20:30:47 +0000 (22:30 +0200)]
Rollup merge of #100104 - GuillaumeGomez:rm-clean-impls, r=Dylan-DPC

Remove more Clean trait implementations

Follow-up of https://github.com/rust-lang/rust/pull/99638.

r? ``@notriddle``

22 months agoRollup merge of #100102 - b-naber:typo-higher-ranked-sub, r=Dylan-DPC
Matthias Krüger [Wed, 3 Aug 2022 20:30:46 +0000 (22:30 +0200)]
Rollup merge of #100102 - b-naber:typo-higher-ranked-sub, r=Dylan-DPC

Fix typo

r? ```@jackh726```

22 months agoRollup merge of #100083 - notriddle:notriddle/source-files-js, r=GuillaumeGomez
Matthias Krüger [Wed, 3 Aug 2022 20:30:46 +0000 (22:30 +0200)]
Rollup merge of #100083 - notriddle:notriddle/source-files-js, r=GuillaumeGomez

rustdoc: use a more compact encoding for source-files.js

This reduces the compiler-doc file from 40K to 36K, a 10% reduction in size.

22 months agoRollup merge of #100068 - dcsommer:master, r=petrochenkov
Matthias Krüger [Wed, 3 Aug 2022 20:30:45 +0000 (22:30 +0200)]
Rollup merge of #100068 - dcsommer:master, r=petrochenkov

Fix backwards-compatibility check for tests with `+whole-archive`

Fixes #100066

22 months agoRollup merge of #98877 - topjohnwu:fix-lld, r=jyn514
Matthias Krüger [Wed, 3 Aug 2022 20:30:44 +0000 (22:30 +0200)]
Rollup merge of #98877 - topjohnwu:fix-lld, r=jyn514

Set llvm configs when building lld

Several LLVM configs applied when building LLVM should also be applied when building LLD.

For example, without the fix, setting both `llvm.thin-lto=true` and `rust.lld=true` when building on Linux will fail, since we need to manually override the compiler and linker to `clang`, but those will not be used when building LLD, causing link errors.

r? ```@jyn514```

22 months agoRollup merge of #100029 - hdelc:master, r=cjgillot
Matthias Krüger [Wed, 3 Aug 2022 20:29:31 +0000 (22:29 +0200)]
Rollup merge of #100029 - hdelc:master, r=cjgillot

Prevent ICE for `doc_alias` on match arm, statement, expression

Fixes #99777.

This is a pretty minimal fix that should be safe, since rustdoc doesn't generate documentation for match arms, statements, or expressions. I mentioned in the linked issue that the `doc_alias` target checking should probably be improved to avoid future ICEs, but as a new contributor, I'm not confident enough with the HIR types to make a larger change.

22 months agoRollup merge of #99795 - compiler-errors:delay-specialization-normalize-error, r...
Matthias Krüger [Wed, 3 Aug 2022 20:29:30 +0000 (22:29 +0200)]
Rollup merge of #99795 - compiler-errors:delay-specialization-normalize-error, r=spastorino

Delay a bug when failed to normalize trait ref during specialization

The error messages still kinda suck here but they don't ICE anymore...

Fixes #45814
Fixes #43037

r? types

22 months agoRollup merge of #99786 - obeis:issue-99625, r=compiler-errors
Matthias Krüger [Wed, 3 Aug 2022 20:29:29 +0000 (22:29 +0200)]
Rollup merge of #99786 - obeis:issue-99625, r=compiler-errors

Recover from C++ style `enum struct`

Closes #99625

22 months agoRollup merge of #99746 - compiler-errors:more-trait-engine, r=jackh726
Matthias Krüger [Wed, 3 Aug 2022 20:29:27 +0000 (22:29 +0200)]
Rollup merge of #99746 - compiler-errors:more-trait-engine, r=jackh726

Use `TraitEngine` in more places that don't specifically need `FulfillmentContext::new_in_snapshot`

Not sure if this change is worthwhile, but couldn't hurt re: chalkification

r? types

22 months agoRollup merge of #98835 - aliemjay:relate_closure_substs, r=nikomatsakis
Matthias Krüger [Wed, 3 Aug 2022 20:29:26 +0000 (22:29 +0200)]
Rollup merge of #98835 - aliemjay:relate_closure_substs, r=nikomatsakis

relate `closure_substs.parent_substs()` to parent fn in NLL

Fixes #98589

The discrepancy between early- and late-bound lifetimes is because we map early-bound lifetimes into those found in the `closure_substs` while late-bound lifetimes are mapped into liberated free regions:
https://github.com/rust-lang/rust/blob/5f98537eb7b5f42c246a52c550813c3cff336069/compiler/rustc_borrowck/src/universal_regions.rs#L255-L261

r? `@rust-lang/types`

22 months agoRollup merge of #98771 - Thog:rust-lld-apple-target, r=petrochenkov
Matthias Krüger [Wed, 3 Aug 2022 20:29:25 +0000 (22:29 +0200)]
Rollup merge of #98771 - Thog:rust-lld-apple-target, r=petrochenkov

Add support for link-flavor rust-lld for iOS, tvOS and watchOS

This adds support for rust-lld for Apple *OS targets.

This was tested against targets ``aarch64-apple-ios`` and ``aarch64-apple-ios-sim`` with [a simple test program](https://github.com/Thog/rust-lld-apple-target_test).

It currently doesn't work with targets ``armv7-apple-ios`` and ``armv7s-apple-ios`` because of ``symbols.o`` not being generated with the correct CPU subtype. This will require changes in the ``object`` crate to expose an API.

As ``ld64.lld`` requires ``-platform_version`` with the minimal version supported and an sdk version, I made ``rustc_target::apple_base`` public to get access to ``*os_deployment_target``  helper functions and also added ``tvos_deployment_target`` as it was missing.

22 months agoUpdate cargo
Eric Huss [Wed, 3 Aug 2022 19:57:28 +0000 (12:57 -0700)]
Update cargo

22 months agoAuto merge of #100088 - RalfJung:anyhow, r=Mark-Simulacrum
bors [Wed, 3 Aug 2022 19:34:24 +0000 (19:34 +0000)]
Auto merge of #100088 - RalfJung:anyhow, r=Mark-Simulacrum

update anyhow

Fixes https://github.com/rust-lang/rust/issues/100062 by incorporating https://github.com/dtolnay/anyhow/pull/249

22 months agoFilesTimes support does not build for ESP-IDF
Ivan Markov [Wed, 3 Aug 2022 19:07:25 +0000 (19:07 +0000)]
FilesTimes support does not build for ESP-IDF

22 months agoProvide suggestion on missing `let` in binding statement
Esteban Küber [Wed, 3 Aug 2022 16:29:29 +0000 (09:29 -0700)]
Provide suggestion on missing `let` in binding statement

Fix #78907.

22 months agoAuto merge of #100064 - RalfJung:disaligned, r=petrochenkov
bors [Wed, 3 Aug 2022 16:09:56 +0000 (16:09 +0000)]
Auto merge of #100064 - RalfJung:disaligned, r=petrochenkov

fix is_disaligned logic for nested packed structs

https://github.com/rust-lang/rust/pull/83605 broke the `is_disaligned` logic by bailing out of the loop in `is_within_packed` early. This PR fixes that problem and adds suitable tests.

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

22 months agoAdd support for link-flavor rust-lld for iOS, tvOS and watchOS
mary [Fri, 1 Jul 2022 15:12:46 +0000 (15:12 +0000)]
Add support for link-flavor rust-lld for iOS, tvOS and watchOS

This adds support for rust-lld for Apple *OS targets.

This was tested against targets "aarch64-apple-ios" and "aarch64-apple-ios-sim".

For targets "armv7-apple-ios" and "armv7s-apple-ios", it doesn't link because of
"symbols.o" not being generated with the correct CPU subtype (changes in
the "object" crate needs to be done to support it).

22 months agofix is_disaligned logic for nested packed structs
Ralf Jung [Tue, 2 Aug 2022 16:21:38 +0000 (12:21 -0400)]
fix is_disaligned logic for nested packed structs

22 months agoAuto merge of #100023 - saethlin:send-sync-chunksmut, r=m-ou-se
bors [Wed, 3 Aug 2022 13:17:58 +0000 (13:17 +0000)]
Auto merge of #100023 - saethlin:send-sync-chunksmut, r=m-ou-se

Add back Send and Sync impls on ChunksMut iterators

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

These were accidentally removed in #94247 because the representation was changed from `&mut [T]` to `*mut T`, which has `!Send + !Sync`.

22 months agofix trailing whitespace in error message
klensy [Wed, 3 Aug 2022 12:46:34 +0000 (15:46 +0300)]
fix trailing whitespace in error message

22 months agoAuto merge of #100100 - Dylan-DPC:rollup-llcaaq8, r=Dylan-DPC
bors [Wed, 3 Aug 2022 10:26:01 +0000 (10:26 +0000)]
Auto merge of #100100 - Dylan-DPC:rollup-llcaaq8, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #99371 (Remove synchronization from Windows `hashmap_random_keys`)
 - #99614 (do not claim that transmute is like memcpy)
 - #99738 (rustdoc: avoid inlining modules with duplicate names)
 - #99800 (Fix futex module imports on wasm+atomics)
 - #100079 (Replace `* -> vec` with `-> vec` in docs)

Failed merges:

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

22 months agoadd regression test for #90871
Takayuki Maeda [Wed, 3 Aug 2022 09:51:21 +0000 (18:51 +0900)]
add regression test for #90871

22 months agocosmetic changes
Ali MJ Al-Nasrawy [Wed, 3 Aug 2022 09:46:04 +0000 (12:46 +0300)]
cosmetic changes

22 months agoremove Clean trait implementation for hir::IsAuto
Guillaume Gomez [Wed, 3 Aug 2022 09:38:18 +0000 (11:38 +0200)]
remove Clean trait implementation for hir::IsAuto

22 months agoremove Clean trait implementation for ty::Region
Guillaume Gomez [Wed, 3 Aug 2022 09:35:32 +0000 (11:35 +0200)]
remove Clean trait implementation for ty::Region

22 months agofix typo
b-naber [Wed, 3 Aug 2022 09:04:10 +0000 (11:04 +0200)]
fix typo

22 months agoSet llvm configs when building lld
topjohnwu [Wed, 3 Aug 2022 08:54:24 +0000 (01:54 -0700)]
Set llvm configs when building lld

22 months agoRollup merge of #100079 - camelid:fix-doc-star-search, r=Dylan-DPC
Dylan DPC [Wed, 3 Aug 2022 08:15:53 +0000 (13:45 +0530)]
Rollup merge of #100079 - camelid:fix-doc-star-search, r=Dylan-DPC

Replace `* -> vec` with `-> vec` in docs

Fixes #100078.

Rustdoc's current syntax is `-> vec`.

22 months agoRollup merge of #99800 - sandydoo:bugfix/wasm-futex, r=m-ou-se
Dylan DPC [Wed, 3 Aug 2022 08:15:52 +0000 (13:45 +0530)]
Rollup merge of #99800 - sandydoo:bugfix/wasm-futex, r=m-ou-se

Fix futex module imports on wasm+atomics

The futex modules were rearranged a bit in #98707, which meant that wasm+atomics would no longer compile on nightly. I don’t believe any other targets were impacted by this.

22 months agoRollup merge of #99738 - notriddle:notriddle/multiple-modules-w-same-name, r=camelid
Dylan DPC [Wed, 3 Aug 2022 08:15:51 +0000 (13:45 +0530)]
Rollup merge of #99738 - notriddle:notriddle/multiple-modules-w-same-name, r=camelid

rustdoc: avoid inlining modules with duplicate names

Fixes rust-lang/rust#99734

22 months agoRollup merge of #99614 - RalfJung:transmute-is-not-memcpy, r=thomcc
Dylan DPC [Wed, 3 Aug 2022 08:15:50 +0000 (13:45 +0530)]
Rollup merge of #99614 - RalfJung:transmute-is-not-memcpy, r=thomcc

do not claim that transmute is like memcpy

Saying transmute is like memcpy is not a well-formed statement, since memcpy is by-ref whereas transmute is by-val. The by-val nature of transmute inherently means that padding is lost along the way. (This is not specific to transmute, this is how all by-value operations work.) So adjust the docs to clarify this aspect.

Cc `@workingjubilee`

22 months agoRollup merge of #99371 - ChrisDenton:simplify-gen-random-keys, r=thomcc
Dylan DPC [Wed, 3 Aug 2022 08:15:49 +0000 (13:45 +0530)]
Rollup merge of #99371 - ChrisDenton:simplify-gen-random-keys, r=thomcc

Remove synchronization from Windows `hashmap_random_keys`

Unfortunately using synchronization when generating hashmap keys can prevent it being used in `DllMain`.

~~Fixes #99341~~

22 months agoAuto merge of #100082 - matthiaskrgr:rollup-ywu4iux, r=matthiaskrgr
bors [Wed, 3 Aug 2022 04:50:42 +0000 (04:50 +0000)]
Auto merge of #100082 - matthiaskrgr:rollup-ywu4iux, r=matthiaskrgr

Rollup of 6 pull requests

Successful merges:

 - #99933 (parallelize HTML checking tool)
 - #99958 (Improve position named arguments lint underline and formatting names)
 - #100008 (Update all pre-cloned submodules on startup)
 - #100049 (:arrow_up: rust-analyzer)
 - #100070 (Clarify Cargo.toml comments)
 - #100074 (rustc-docs: Be less specific about the representation of `+bundle`)

Failed merges:

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

22 months agoAdd items to `DocAliasBadLocation` check error match arm
hdelc [Wed, 3 Aug 2022 03:11:22 +0000 (23:11 -0400)]
Add items to `DocAliasBadLocation` check error match arm

- Added `Impl`, `Closure`, ForeignMod` targets
- `Target::name` changed for `Target::Impl`
- Error output for `Target::ForeignMod` changed to "foreign module"

22 months agoUpdate rls
Eric Huss [Wed, 3 Aug 2022 03:08:30 +0000 (20:08 -0700)]
Update rls

22 months agoupdate anyhow
Ralf Jung [Wed, 3 Aug 2022 02:14:48 +0000 (22:14 -0400)]
update anyhow

22 months agoAuto merge of #99509 - lcnr:commit_unconditionally, r=jackh726
bors [Wed, 3 Aug 2022 01:55:20 +0000 (01:55 +0000)]
Auto merge of #99509 - lcnr:commit_unconditionally, r=jackh726

remove `commit_unconditionally`

`commit_unconditionally` is a noop unless we somehow inspect the current state of our snapshot. The only thing which does that is the leak check which was only used in one place where `commit_if_ok` is probably at least as, or even more, correct.

r? rust-lang/types

22 months agoDelay a bug when failed to normalize trait ref during specialization
Michael Goulet [Wed, 27 Jul 2022 05:06:46 +0000 (05:06 +0000)]
Delay a bug when failed to normalize trait ref during specialization

22 months agowordsmithing
Ralf Jung [Wed, 3 Aug 2022 00:43:28 +0000 (20:43 -0400)]
wordsmithing

22 months agoRemove CARGO_TEST_DISABLE_GIT_CLI
Eric Huss [Tue, 2 Aug 2022 16:25:35 +0000 (09:25 -0700)]
Remove CARGO_TEST_DISABLE_GIT_CLI

This was a leftover from the Appveyor days.

22 months agoUpdate cargo
Eric Huss [Tue, 2 Aug 2022 16:24:03 +0000 (09:24 -0700)]
Update cargo

22 months agoFix backwards-compatibility check for tests with `+whole-archive`
Daniel Sommermann [Mon, 1 Aug 2022 18:47:32 +0000 (11:47 -0700)]
Fix backwards-compatibility check for tests with `+whole-archive`

Fixes #100066

22 months agorustdoc: avoid inlining foreigns with duplicate names
Michael Howell [Tue, 2 Aug 2022 21:48:23 +0000 (14:48 -0700)]
rustdoc: avoid inlining foreigns with duplicate names

22 months agoAuto merge of #92268 - jswrenn:transmute, r=oli-obk
bors [Tue, 2 Aug 2022 21:17:31 +0000 (21:17 +0000)]
Auto merge of #92268 - jswrenn:transmute, r=oli-obk

Initial implementation of transmutability trait.

*T'was the night before Christmas and all through the codebase, not a miri was stirring — no hint of `unsafe`!*

This PR provides an initial, **incomplete** implementation of *[MCP 411: Lang Item for Transmutability](https://github.com/rust-lang/compiler-team/issues/411)*. The `core::mem::BikeshedIntrinsicFrom` trait provided by this PR is implemented on-the-fly by the compiler for types `Src` and `Dst` when the bits of all possible values of type `Src` are safely reinterpretable as a value of type `Dst`.

What this PR provides is:
- [x] [support for transmutations involving primitives](https://github.com/jswrenn/rust/tree/transmute/src/test/ui/transmutability/primitives)
- [x] [support for transmutations involving arrays](https://github.com/jswrenn/rust/tree/transmute/src/test/ui/transmutability/arrays)
- [x] [support for transmutations involving structs](https://github.com/jswrenn/rust/tree/transmute/src/test/ui/transmutability/structs)
- [x] [support for transmutations involving enums](https://github.com/jswrenn/rust/tree/transmute/src/test/ui/transmutability/enums)
- [x] [support for transmutations involving unions](https://github.com/jswrenn/rust/tree/transmute/src/test/ui/transmutability/unions)
- [x] [support for weaker validity checks](https://github.com/jswrenn/rust/blob/transmute/src/test/ui/transmutability/unions/should_permit_intersecting_if_validity_is_assumed.rs) (i.e., `Assume::VALIDITY`)
- [x] visibility checking

What isn't yet implemented:
- [ ] transmutability options passed using the `Assume` struct
- [ ] [support for references](https://github.com/jswrenn/rust/blob/transmute/src/test/ui/transmutability/references.rs)
- [ ] smarter error messages

These features will be implemented in future PRs.

22 months agoRollup merge of #100074 - petrochenkov:bundledoc, r=bjorn3
Matthias Krüger [Tue, 2 Aug 2022 21:07:49 +0000 (23:07 +0200)]
Rollup merge of #100074 - petrochenkov:bundledoc, r=bjorn3

rustc-docs: Be less specific about the representation of `+bundle`

For https://github.com/rust-lang/rust/issues/99429.
r? `@bjorn3`

22 months agoRollup merge of #100070 - mqudsi:99768_revisited, r=RalfJung
Matthias Krüger [Tue, 2 Aug 2022 21:07:48 +0000 (23:07 +0200)]
Rollup merge of #100070 - mqudsi:99768_revisited, r=RalfJung

Clarify Cargo.toml comments

Existing comments were left in an incoherent state after #99768.

r? `@RalfJung`

22 months agoRollup merge of #100049 - lnicola:rust-analyzer-2022-08-02, r=lnicola
Matthias Krüger [Tue, 2 Aug 2022 21:07:47 +0000 (23:07 +0200)]
Rollup merge of #100049 - lnicola:rust-analyzer-2022-08-02, r=lnicola

:arrow_up: rust-analyzer

r? `@ghost`

22 months agoRollup merge of #100008 - jyn514:eager-submodules, r=bjorn3
Matthias Krüger [Tue, 2 Aug 2022 21:07:46 +0000 (23:07 +0200)]
Rollup merge of #100008 - jyn514:eager-submodules, r=bjorn3

Update all pre-cloned submodules on startup

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

22 months agoRollup merge of #99958 - PrestonFrom:issue_99907, r=compiler-errors
Matthias Krüger [Tue, 2 Aug 2022 21:07:45 +0000 (23:07 +0200)]
Rollup merge of #99958 - PrestonFrom:issue_99907, r=compiler-errors

Improve position named arguments lint underline and formatting names

For named arguments used as implicit position arguments, underline both
the opening curly brace and either:
* if there is formatting, the next character (which will either be the
  closing curl brace or the `:` denoting the start of formatting args)
* if there is no formatting, the entire arg span (important if there is
  whitespace like `{  }`)

This should make it more obvious where the named argument should be.

Additionally, in the lint message, emit the formatting argument names
without a dollar sign to avoid potentially confusion.

Fixes #99907

22 months agoRollup merge of #99933 - alex:parallel-html-checking, r=Mark-Simulacrum
Matthias Krüger [Tue, 2 Aug 2022 21:07:44 +0000 (23:07 +0200)]
Rollup merge of #99933 - alex:parallel-html-checking, r=Mark-Simulacrum

parallelize HTML checking tool

there's a lot of IO, so timings on my laptop are far from stable, but it seems to be considerably faster.

this step often appears to take 5+ minutes in CI, so hopefully this offers a speedup

22 months agoReplace `* -> vec` with `-> vec` in docs
Noah Lev [Tue, 2 Aug 2022 20:59:18 +0000 (13:59 -0700)]
Replace `* -> vec` with `-> vec` in docs

Rustdoc's current syntax is `-> vec`.

22 months agoMake `Target::name` method pass by copy
hdelc [Tue, 2 Aug 2022 20:30:09 +0000 (16:30 -0400)]
Make `Target::name` method pass by copy

22 months agorustdoc: use a more compact encoding for source-files.js
Michael Howell [Tue, 2 Aug 2022 20:24:34 +0000 (13:24 -0700)]
rustdoc: use a more compact encoding for source-files.js

This reduces the compiler-doc file from 40K to 36K, a 10% reduction in size.

22 months agorustc-docs: Be less specific about the representation of `+bundle`
Vadim Petrochenkov [Tue, 2 Aug 2022 19:29:29 +0000 (22:29 +0300)]
rustc-docs: Be less specific about the representation of `+bundle`

22 months agoClarify Cargo.toml comments
Mahmoud Al-Qudsi [Tue, 2 Aug 2022 17:50:06 +0000 (12:50 -0500)]
Clarify Cargo.toml comments

Existing comments were left in an incoherent state after #99768.

22 months agoAuto merge of #100063 - matthiaskrgr:rollup-lznouys, r=matthiaskrgr
bors [Tue, 2 Aug 2022 17:18:58 +0000 (17:18 +0000)]
Auto merge of #100063 - matthiaskrgr:rollup-lznouys, r=matthiaskrgr

Rollup of 7 pull requests

Successful merges:

 - #99987 (Always include a position span in `rustc_parse_format::Argument`)
 - #100005 (Remove Clean trait for ast::Attribute and improve Attributes::from_ast)
 - #100025 (Remove redundant `TransferWrapper` struct)
 - #100045 (Properly reject the `may_unwind` option in `global_asm!`)
 - #100052 (RISC-V ASM test: relax label name constraint.)
 - #100053 (move [`assertions_on_result_states`] to restriction)
 - #100057 (Remove more Clean trait implementations)

Failed merges:

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

22 months agoRollup merge of #100057 - GuillaumeGomez:rm-more-clean-impl, r=Dylan-DPC
Matthias Krüger [Tue, 2 Aug 2022 15:17:37 +0000 (17:17 +0200)]
Rollup merge of #100057 - GuillaumeGomez:rm-more-clean-impl, r=Dylan-DPC

Remove more Clean trait implementations

Follow-up of https://github.com/rust-lang/rust/pull/99638.

r? ``@notriddle``

22 months agoRollup merge of #100053 - flip1995:clippy_backport, r=xFrednet
Matthias Krüger [Tue, 2 Aug 2022 15:17:36 +0000 (17:17 +0200)]
Rollup merge of #100053 - flip1995:clippy_backport, r=xFrednet

move [`assertions_on_result_states`] to restriction

"Backports" the first commit of https://github.com/rust-lang/rust-clippy/pull/9273, so that the lint doesn't go into beta as a warn-by-default lint.

The other changes in the linked PR can ride the train as usual.

r? ``@xFrednet`` (only Clippy changes, so we don't need to bother compiler people)

---

For Clippy:

changelog: none

22 months agoRollup merge of #100052 - TimNN:patch-1, r=nikic
Matthias Krüger [Tue, 2 Aug 2022 15:17:35 +0000 (17:17 +0200)]
Rollup merge of #100052 - TimNN:patch-1, r=nikic

RISC-V ASM test: relax label name constraint.

The test is currently [broken at LLVM Head](https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/12425#01825d5b-c3d1-4fdc-a98d-5956b246aee2), likely since https://github.com/llvm/llvm-project/commit/260a64106854986a981e49ed87ee740460a23eb5:

```plain
/var/lib/buildkite-agent/builds/rust-llvm-integrate/llvm-project/rust-llvm-integrate-prototype/src/test/assembly/asm/riscv-types.rs:59:11: error: CHECK: expected string not found in input
--
  | // CHECK: lb t0, %pcrel_lo(.Lpcrel_hi0)(t0)
  | ^
  | /var/lib/buildkite-agent/builds/rust-llvm-integrate/llvm-project/rust-llvm-integrate-prototype/build/x86_64-unknown-linux-gnu/test/assembly/asm/riscv-types.riscv64/riscv-types.s:24:36: note: scanning from here
  | auipc t0, %pcrel_hi(extern_static)
  | ^
  | /var/lib/buildkite-agent/builds/rust-llvm-integrate/llvm-project/rust-llvm-integrate-prototype/build/x86_64-unknown-linux-gnu/test/assembly/asm/riscv-types.riscv64/riscv-types.s:25:2: note: possible intended match here
  | lb t0, %pcrel_lo(.Lpcrel_hi18)(t0)
  | ^
```

As far as I can tell, the exact index in the label probably doesn't matter for the test, especially if LLVM can change it to ~arbitrary values, though I'm not an ASM or RISC-V expert.

This [fixes the test](https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/12427).

22 months agoRollup merge of #100045 - Amanieu:global_asm_may_unwind, r=tmiasko
Matthias Krüger [Tue, 2 Aug 2022 15:17:34 +0000 (17:17 +0200)]
Rollup merge of #100045 - Amanieu:global_asm_may_unwind, r=tmiasko

Properly reject the `may_unwind` option in `global_asm!`

This was accidentally accepted even though it had no effect in
`global_asm!`. The option only makes sense for `asm!` which runs within
a function.

22 months agoRollup merge of #100025 - tmiasko:rm-transfer-wrapper, r=cjgillot
Matthias Krüger [Tue, 2 Aug 2022 15:17:33 +0000 (17:17 +0200)]
Rollup merge of #100025 - tmiasko:rm-transfer-wrapper, r=cjgillot

Remove redundant `TransferWrapper` struct

22 months agoRollup merge of #100005 - GuillaumeGomez:cleanup-ast-attr-clean, r=notriddle
Matthias Krüger [Tue, 2 Aug 2022 15:17:31 +0000 (17:17 +0200)]
Rollup merge of #100005 - GuillaumeGomez:cleanup-ast-attr-clean, r=notriddle

Remove Clean trait for ast::Attribute and improve Attributes::from_ast

I prefer to keep this commit on its own for this PR because I'm changing a bit more things than expected originally: I split `Attributes::from_ast` into two because there is only one location making use of its second parameter.

Follow-up of https://github.com/rust-lang/rust/pull/99638.

r? `@notriddle`

22 months agoRollup merge of #99987 - Alexendoo:parse-format-position-span, r=fee1-dead
Matthias Krüger [Tue, 2 Aug 2022 15:17:30 +0000 (17:17 +0200)]
Rollup merge of #99987 - Alexendoo:parse-format-position-span, r=fee1-dead

Always include a position span in `rustc_parse_format::Argument`

Moves the spans from the `Position` enum to always be included in the `Argument` struct. Doesn't make any changes to use it in rustc, but it will be useful for some upcoming Clippy lints

22 months agosafe transmute: fix broken intradoc link
Jack Wrenn [Tue, 2 Aug 2022 14:44:23 +0000 (14:44 +0000)]
safe transmute: fix broken intradoc link

22 months agoAdd exhaustive location checking for `doc_alias` attribute
hdelc [Tue, 2 Aug 2022 14:05:11 +0000 (10:05 -0400)]
Add exhaustive location checking for `doc_alias` attribute

22 months agoRefactor `Display` impl for `Target` to `Target::name` method
hdelc [Tue, 2 Aug 2022 13:39:50 +0000 (09:39 -0400)]
Refactor `Display` impl for `Target` to `Target::name` method

22 months agoAuto merge of #100032 - BoxyUwU:no_ty_in_placeholder_const, r=compiler-errors
bors [Tue, 2 Aug 2022 13:10:49 +0000 (13:10 +0000)]
Auto merge of #100032 - BoxyUwU:no_ty_in_placeholder_const, r=compiler-errors

make `PlaceholderConst` not store the type of the const

Currently the `Placeholder` variant on `ConstKind` is 28 bytes when with this PR its 8 bytes, i am not sure this is really useful at all rn since `Unevaluated` and `Value` variants are huge still but eventually it should be possible to get both down to 16 bytes :thinking:. Mostly opening this to see if this change has any perf impact when done before it can make `ConstKind`/`ConstS` smaller

22 months agofix rustdoc regression
Ali MJ Al-Nasrawy [Sun, 3 Jul 2022 16:56:51 +0000 (19:56 +0300)]
fix rustdoc regression

22 months agoNLL: relate closure to parent fn
Ali MJ Al-Nasrawy [Sun, 3 Jul 2022 00:22:04 +0000 (03:22 +0300)]
NLL: relate closure to parent fn

22 months agoRemove Clean trait implementation for ast::Attribute and cleanup Attributes::from_ast...
Guillaume Gomez [Sun, 31 Jul 2022 23:59:33 +0000 (01:59 +0200)]
Remove Clean trait implementation for ast::Attribute and cleanup Attributes::from_ast function by splitting it in two

22 months agoRemove Clean trait implementation for hir::Lifetime
Guillaume Gomez [Tue, 2 Aug 2022 10:55:25 +0000 (12:55 +0200)]
Remove Clean trait implementation for hir::Lifetime

22 months agoRemove Clean trait implementation for ty::TraitRef
Guillaume Gomez [Tue, 2 Aug 2022 10:42:36 +0000 (12:42 +0200)]
Remove Clean trait implementation for ty::TraitRef

22 months agoAuto merge of #99977 - BlackHoleFox:cfte-cstr, r=thomcc
bors [Tue, 2 Aug 2022 09:07:31 +0000 (09:07 +0000)]
Auto merge of #99977 - BlackHoleFox:cfte-cstr, r=thomcc

Add validation to const fn CStr creation

Improves upon the existing validation that only worked when building the stdlib from source. `CStr::from_bytes_with_nul_unchecked` now utilizes `const_eval_select` to validate the safety requirements of the function when used as `const FOO: &CStr = CStr::from_bytes_with_nul_unchecked(b"Foobar\0");`.

This can help catch erroneous code written by accident and, assuming a new enough `rustc` in use, remove the need for boilerplate safety comments for this function in `const` contexts.

~~I think this might need a UI test, but I don't know where to put it. If this is a worth change, a perf run would be nice to make sure the `O(n)` validation isn't too bad. I didn't notice a difference building the stdlib tests locally.~~

22 months agomove [`assertions_on_result_states`] to restriction
tabokie [Mon, 1 Aug 2022 05:22:16 +0000 (13:22 +0800)]
move [`assertions_on_result_states`] to restriction

Signed-off-by: tabokie <xy.tao@outlook.com>
22 months agoRISC-V ASM test: relax label name constraint.
Tim Neumann [Tue, 2 Aug 2022 08:10:11 +0000 (10:10 +0200)]
RISC-V ASM test: relax label name constraint.

22 months agoMove if-block into closure to reduce duplicate code
Preston From [Tue, 2 Aug 2022 06:20:12 +0000 (00:20 -0600)]
Move if-block into closure to reduce duplicate code

22 months agoImprove position named arguments lint underline and formatting names
Preston From [Sat, 30 Jul 2022 04:52:46 +0000 (22:52 -0600)]
Improve position named arguments lint underline and formatting names

For named arguments used as implicit position arguments, underline both
the opening curly brace and either:
* if there is formatting, the next character (which will either be the
  closing curl brace or the `:` denoting the start of formatting args)
* if there is no formatting, the entire arg span (important if there is
  whitespace like `{  }`)

This should make it more obvious where the named argument should be.

Additionally, in the lint message, emit the formatting argument names
without a dollar sign to avoid potentially confusion.

Fixes #99907

22 months agoAuto merge of #100048 - matthiaskrgr:rollup-agimvm6, r=matthiaskrgr
bors [Tue, 2 Aug 2022 06:09:22 +0000 (06:09 +0000)]
Auto merge of #100048 - matthiaskrgr:rollup-agimvm6, r=matthiaskrgr

Rollup of 8 pull requests

Successful merges:

 - #99156 (`codegen_fulfill_obligation` expect erased regions)
 - #99293 (only run --all-targets in stage0 for Std)
 - #99779 (Fix item info pos and height)
 - #99994 (Remove `guess_head_span`)
 - #100011 (Use Parser's `restrictions` instead of `let_expr_allowed`)
 - #100017 (kmc-solid: Update `Socket::connect_timeout` to be in line with #78802)
 - #100037 (Update rustc man page to match `rustc --help`)
 - #100042 (Update books)

Failed merges:

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

22 months ago:arrow_up: rust-analyzer
Laurențiu Nicola [Tue, 2 Aug 2022 06:05:16 +0000 (09:05 +0300)]
:arrow_up: rust-analyzer

22 months agoRollup merge of #100042 - ehuss:update-books, r=ehuss
Matthias Krüger [Tue, 2 Aug 2022 05:30:47 +0000 (07:30 +0200)]
Rollup merge of #100042 - ehuss:update-books, r=ehuss

Update books

## reference

2 commits in a92be0fef439b3d8e0468d82cb24812d303520a0..f3d3953bf3b158d596c96d55ce5366f9f3f972e9
2022-07-21 19:01:23 -0700 to 2022-08-01 17:17:37 -0700
- Add `let_chains` references (rust-lang/reference#1179)
- Remove outdated warning (rust-lang/reference#1243)

## rust-by-example

18 commits in 3155db49b0d57cd82c65456ac210b69ecec5ccb1..ee342dc91e1ba1bb1e1f1318f84bbe3bfac04798
2022-07-05 20:35:53 -0300 to 2022-07-27 11:06:36 -0300
- Closure inferred twice (rust-lang/rust-by-example#1588)
- fix a syntax bug in example assembly (rust-lang/rust-by-example#1511)
- Minor grammar change in src/std/rc.md paragraph 2 (rust-lang/rust-by-example#1586)
- Fix typo in asm.md (rust-lang/rust-by-example#1585)
- Fix incorrect padding in fixed-width print (rust-lang/rust-by-example#1584)
- Update print.md (rust-lang/rust-by-example#1582)
- add-chapter-on-defaults (rust-lang/rust-by-example#1580)
- Fix typo (rust-lang/rust-by-example#1579)
- fix a compile error (rust-lang/rust-by-example#1578)
- Suggest using mod.rs pattern to share test code (rust-lang/rust-by-example#1577)
- fix a compile error in iter_any.md (rust-lang/rust-by-example#1576)
- Mention attribute like macros in attributes.md (rust-lang/rust-by-example#1574)
- Update exercise to be clearer (rust-lang/rust-by-example#1573)
- fixes link for turbofish in testcase_mapreduce.md (rust-lang/rust-by-example#1572)
- Fix inconsistency between comment and code in hello/print.md (rust-lang/rust-by-example#1571)
- Fixes a typo in print.md (rust-lang/rust-by-example#1570)
- into_iter-moves-elements (rust-lang/rust-by-example#1569)
- Fix a typo in print.md (rust-lang/rust-by-example#1568)

## rustc-dev-guide

16 commits in d5201cddace979b299ec1bf9fd8997338151aa9d..04f3cf0bb2f5a6ee2bfc4b1a6a6cd8c11d1c5531
2022-07-21 04:48:49 +0200 to 2022-07-31 07:46:57 +0200
- address review comment
- accept review suggestion
- try address review comments
- summary of chapter
- Update src/building/compiler-documenting.md
- revamp doc-build chapter
- minor fixes
- Prefer relative links
- Fix the link to clippy docs
- Fix the link to `ResolverAstLowering`
- Fix the link to `ProcMacro` trait
- Fix the link to `Lazy&lt;T&gt;`
- Add instructions to fix build errors in std after adding a new target
- Document how to build a cross-compiler
- Add documentation about Microsoft provided debuggers and CodeView/PDB… (rust-lang/rustc-dev-guide#1406)
- rust-analyzer is now a subtree

## embedded-book

2 commits in 766979590da8100998f0d662499d4a901d8d1640..befe6840874311635c417cf731377f07234ee373
2022-07-04 09:13:58 +0000 to 2022-07-25 07:51:14 +0000
- Updated instructions for running first Hardware example  (rust-embedded/book#323)
- Improved ligability for hardware.md  (rust-embedded/book#324)

22 months agoRollup merge of #100037 - fw-immunant:patch-1, r=jyn514
Matthias Krüger [Tue, 2 Aug 2022 05:30:46 +0000 (07:30 +0200)]
Rollup merge of #100037 - fw-immunant:patch-1, r=jyn514

Update rustc man page to match `rustc --help`

This brings the `--crate-type`,  `--emit`, and `--print` options' allowed arguments into sync with that printed by `rustc --help`.

c.f. the `opt::multi_s` calls for `"crate-type"`, `"emit"`, and `"print"` here: https://github.com/rust-lang/rust/blob/master/compiler/rustc_session/src/config.rs

22 months agoRollup merge of #100017 - solid-rs:patch/kmc-solid/adapt-to-78802, r=thomcc
Matthias Krüger [Tue, 2 Aug 2022 05:30:45 +0000 (07:30 +0200)]
Rollup merge of #100017 - solid-rs:patch/kmc-solid/adapt-to-78802, r=thomcc

kmc-solid: Update `Socket::connect_timeout` to be in line with #78802

Fixes the build failure of the [`*-kmc-solid_*`](https://doc.rust-lang.org/nightly/rustc/platform-support/kmc-solid.html) Tier 3 targets after #78802.

```
error[E0308]: mismatched types
   --> library\std\src\sys\solid\net.rs:234:45
    |
234 |             cvt(netc::connect(self.0.raw(), addrp, len))
    |                 -------------               ^^^^^ expected *-ptr, found union `SocketAddrCRepr`
    |                 |
    |                 arguments to this function are incorrect
    |
    = note: expected raw pointer `*const sockets::sockaddr`
                     found union `SocketAddrCRepr`
note: function defined here
   --> library\std\src\sys\solid\abi\sockets.rs:173:12
    |
    173 |     pub fn connect(s: c_int, name: *const sockaddr, namelen: socklen_t) -> c_int;
    |            ^^^^^^^
```

22 months agoRollup merge of #100011 - compiler-errors:let-chain-restriction, r=fee1-dead
Matthias Krüger [Tue, 2 Aug 2022 05:30:44 +0000 (07:30 +0200)]
Rollup merge of #100011 - compiler-errors:let-chain-restriction, r=fee1-dead

Use Parser's `restrictions` instead of `let_expr_allowed`

This also means that the `ALLOW_LET` flag is reset properly for subexpressions, so we can properly deny things like `a && (b && let c = d)`. Also the parser is a tiny bit smaller now.

It doesn't reject _all_ bad `let` expr usages, just a bit more.

cc `@c410-f3r`

22 months agoRollup merge of #99994 - TaKO8Ki:remove-guess-head-span, r=fee1-dead
Matthias Krüger [Tue, 2 Aug 2022 05:30:43 +0000 (07:30 +0200)]
Rollup merge of #99994 - TaKO8Ki:remove-guess-head-span, r=fee1-dead

Remove `guess_head_span`

follow-up to #98519

22 months agoRollup merge of #99779 - GuillaumeGomez:fix-item-info-pos-and-height, r=notriddle
Matthias Krüger [Tue, 2 Aug 2022 05:30:41 +0000 (07:30 +0200)]
Rollup merge of #99779 - GuillaumeGomez:fix-item-info-pos-and-height, r=notriddle

Fix item info pos and height

Fixes https://github.com/rust-lang/rust/issues/98266.
Fixes https://github.com/rust-lang/rust/issues/98343.

You can test it [here](https://rustdoc.crud.net/imperio/fix-item-info-pos-and-height/lib2/trait.Trait.html).

Here is a screenshot of the result:

![Screenshot from 2022-07-26 21-55-53](https://user-images.githubusercontent.com/3050060/181100624-18b8b045-5c25-4c7c-9c44-97d55d29b675.png)

r? `@jsha`

22 months agoRollup merge of #99293 - jo3bingham:issue-98720-fix, r=jyn514
Matthias Krüger [Tue, 2 Aug 2022 05:30:40 +0000 (07:30 +0200)]
Rollup merge of #99293 - jo3bingham:issue-98720-fix, r=jyn514

only run --all-targets in stage0 for Std

Repro'd the issue with `python3 x.py check --stage 1 library/std` and tested the fix with the same command.

r? `@jyn514`

I tried to implement [this solution](https://github.com/rust-lang/rust/issues/98720#issuecomment-1184435462), but didn't have any luck. I don't think I fully understood what needed to be done. However, I would love to be mentored on it since it would be a more correct solution, and I can learn more about how bootstrap works.

22 months agoRollup merge of #99156 - lcnr:omoe-wa, r=wesleywiser
Matthias Krüger [Tue, 2 Aug 2022 05:30:39 +0000 (07:30 +0200)]
Rollup merge of #99156 - lcnr:omoe-wa, r=wesleywiser

`codegen_fulfill_obligation` expect erased regions

it's a query, so by erasing regions before calling it, we get better caching.
This doesn't actually change anything as its already the status quo.