Commit graph

1817 commits

Author SHA1 Message Date
Ramon de C Valle 65698ae9f3 Add LLVM KCFI support to the Rust compiler
This commit adds LLVM Kernel Control Flow Integrity (KCFI) support to
the Rust compiler. It initially provides forward-edge control flow
protection for operating systems kernels for Rust-compiled code only by
aggregating function pointers in groups identified by their return and
parameter types. (See llvm/llvm-project@cff5bef.)

Forward-edge control flow protection for C or C++ and Rust -compiled
code "mixed binaries" (i.e., for when C or C++ and Rust -compiled code
share the same virtual address space) will be provided in later work as
part of this project by identifying C char and integer type uses at the
time types are encoded (see Type metadata in the design document in the
tracking issue #89653).

LLVM KCFI can be enabled with -Zsanitizer=kcfi.

Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
2022-12-08 17:24:39 -08:00
Maybe Waffle c44c82de2b Assert size of rustc_parse_format::Piece<'_> 2022-12-08 22:50:39 +00:00
Martin Kröning 6324e5cb6a Bump compiler-builtins to 0.1.85 2022-12-08 15:34:46 +01:00
Matthias Krüger 086bdbbd73
Rollup merge of #104922 - estebank:fur-elize, r=oli-obk
Detect long types in E0308 and write them to disk

On type error with long types, print an abridged type and write the full type to disk.

Print the widest possible short type while still fitting in the terminal.
2022-12-08 12:57:28 +01:00
Matthias Krüger e5a01b97ee
Rollup merge of #104439 - ferrocene:pa-generate-copyright, r=pnkfelix
Add prototype to generate `COPYRIGHT` from REUSE metadata

This PR adds a prototype to generate the `COPYRIGHT` file from the metadata gathered with REUSE. There are two new tools:

* `src/tools/collect-license-metadata` invokes REUSE, parses its output and stores a concise JSON representation of the metadata in `src/etc/license-metadata.json`.
* `src/tools/generate-copyright` parses the metadata generated above, (in the future will) gather crate dependencies metadata, and renders the `COPYRIGHT.md` file.

Note that since the contents of those files are currently incorrect, rather than outputting in the paths above, the files will be stored in `build/` and not committed. This will be changed once we're confident about the metadata.

Eventually, `src/etc/license-metadata.json` will be committed into the repository and verified to be up to date by CI (similar to our GitHub Actions configuration), to avoid having people install REUSE on their local machine in most cases.

You can see the (incorrect) generated files in https://gist.github.com/pietroalbini/3f3f22b6f9cc8533abf7494b6a50cf97.

r? `@pnkfelix`
2022-12-06 13:27:40 +01:00
Matthias Krüger e84e8f4165
Rollup merge of #105222 - devnexen:fbsd_update_img, r=petrochenkov
std update libc version and freebsd image build dependencies
2022-12-05 20:43:43 +01:00
bors e72ea1dc37 Auto merge of #104824 - klensy:bump-some, r=Mark-Simulacrum
deps: update cpufeatures, swap difference to dissimilar

Updating cpufeatures v0.2.1 -> v0.2.5: https://github.com/RustCrypto/utils/blob/master/cpufeatures/CHANGELOG.md#025-2022-09-04, was yanked bc of miscompile (https://github.com/RustCrypto/utils/pull/800, https://github.com/rust-lang/rust/issues/101346)

Removing difference v2.0.0
     Adding dissimilar v1.0.4
   Updating expect-test v1.0.1 -> v1.4.0

difference unmaintened https://rustsec.org/advisories/RUSTSEC-2020-0095.html, so replaced with https://github.com/dtolnay/dissimilar (as dependency of `expect-test`)
2022-12-05 05:54:33 +00:00
bors b8a52e3a4b Auto merge of #105218 - matthiaskrgr:rollup-8d3k08n, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #104199 (Keep track of the start of the argument block of a closure)
 - #105050 (Remove useless borrows and derefs)
 - #105153 (Create a hacky fail-fast mode that stops tests at the first failure)
 - #105164 (Restore `use` suggestion for `dyn` method call requiring `Sized`)
 - #105193 (Disable coverage instrumentation for naked functions)
 - #105200 (Remove useless filter in unused extern crate check.)
 - #105201 (Do not call fn_sig on non-functions.)
 - #105208 (Add AmbiguityError for inconsistent resolution for an import)
 - #105214 (update Miri)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-03 21:25:45 +00:00
David CARLIER 71cf892235 std update libc version and freebsd image build dependencies 2022-12-03 19:01:55 +00:00
Ralf Jung 229e65af51 update lockfile 2022-12-03 16:30:56 +01:00
bors cab4fd678c Auto merge of #97485 - bjorn3:new_archive_writer, r=wesleywiser
Rewrite LLVM's archive writer in Rust

This allows it to be used by other codegen backends.

Fixes https://github.com/bjorn3/rustc_codegen_cranelift/issues/1155
2022-12-03 15:07:39 +00:00
klensy ceee880b31 update cpufeatures, swap difference to dissimilar 2022-11-29 19:59:37 +03:00
Esteban Küber 7674edeeba Detect long types in E0308 and write them to disk
On type error with long types, print an abridged type and write the full
type to disk.

Print the widest possible short type while still fitting in the
terminal.
2022-11-28 14:08:18 -08:00
Maybe Waffle e20e506f7d Make tcx.mk_const more permissive wrt kind argument
- Accept `impl Into`
- Implement `From<>` for `ConstKind`

Note: this adds a dependency on `derive_more` (MIT license). It allows
to derive a lot of traits (like `From` here) that would be otherwise
tedious to implement.
2022-11-28 17:27:20 +00:00
Weihang Lo 1e5dad0bef
Update cargo
5 commits in ba607b23db8398723d659249d9abf5536bc322e5..e027c4b5d25af2119b1956fac42863b9b3242744
2022-11-22 20:52:39 +0000 to 2022-11-25 19:44:46 +0000
- fix: Move off atty to resolve soundness issue (rust-lang/cargo#11420)
- add newline char to `cargo install .` error message for easier reading. (rust-lang/cargo#11401)
- chore: Upgrade to env_logger (rust-lang/cargo#11417)
- Change rustdoc-scrape-examples to be a target-level configuration (rust-lang/cargo#10343)
- temporarily disable test `lto::test_profile` (rust-lang/cargo#11419)
2022-11-27 03:02:08 +00:00
bjorn3 be6708428f Rewrite LLVM's archive writer in Rust
This allows it to be used by other codegen backends
2022-11-26 19:35:32 +00:00
hkalbasi 390a637e29 move things from rustc_target::abi to rustc_abi 2022-11-24 16:26:13 +03:30
hkalbasi 27fb904d68 move some layout logic to rustc_target::abi::layout 2022-11-24 16:26:12 +03:30
Weihang Lo 8a808dc5b4
Update cargo
7 commits in eb5d35917b2395194593c9ca70c3778f60c1573b..ba607b23db8398723d659249d9abf5536bc322e5
2022-11-17 22:08:43 +0000 to 2022-11-22 20:52:39 +0000

- Fix failure to parse rustc's JSON output if it is too nested (rust-lang/cargo#11368)
- Add suggestions when `cargo add` multiple packages (rust-lang/cargo#11186)
- Update mod.rs (rust-lang/cargo#11395)
- Fix typo `try use` -> `try to use` (rust-lang/cargo#11394)
- Add warning when `cargo tree -i <spec>` can not find packages (rust-lang/cargo#11377)
- Clean profile, patch, and replace in cargo remove (rust-lang/cargo#11194)
- chore: Upgrade miow (rust-lang/cargo#11391)
2022-11-23 01:02:04 +00:00
bors e221616639 Auto merge of #104688 - flip1995:clippyup, r=Manishearth,flip1995
Update Clippy

r? `@Manishearth`

Sorry for taking so long. There were so many blockers and so little time. This situation should be mitigated with #104007 in the future.
2022-11-22 17:09:06 +00:00
Manish Goregaokar 952d385121
Rollup merge of #104622 - nicholasbishop:bishop-uefi-clang, r=Mark-Simulacrum
Use clang for the UEFI targets

This fixes an issue where the C and asm sources built by compiler_builtins were being compiled as ELF objects instead of PE objects. This wasn't noticed before because it doesn't cause compiler_builtins or rustc to fail to build. You only see a failure when a program is built that references one of the symbols in an ELF object.

Compiling with clang fixes this because the cc crate converts the UEFI targets into Windows targets that clang understands, causing it to produce PE objects.

Also update compiler_builtins to 0.1.84 to pull in some necessary fixes for compiling the UEFI targets with clang.

Fixes https://github.com/rust-lang/rust/issues/104326
2022-11-22 01:26:08 -05:00
Collin Baker 426296ecc3 Update test's cfg-if dependency to 1.0
This change was mistakenly left out of #103367
2022-11-21 16:43:34 -05:00
Philipp Krones d407778c75
Update Cargo.lock 2022-11-21 20:52:06 +01:00
Matthias Krüger 820a41580e
Rollup merge of #104564 - RalfJung:either, r=oli-obk
interpret: use Either over Result when it is not representing an error condition

r? `@oli-obk`
2022-11-20 18:21:48 +01:00
Ralf Jung a689eb0ded update lockfile 2022-11-20 12:13:48 +01:00
Nicholas Bishop cdb6907893 Update compiler_builtins to 0.1.84 2022-11-19 18:16:24 +00:00
Matthias Krüger c916a8df53
Rollup merge of #104587 - weihanglo:update-cargo, r=weihanglo
Update cargo

3 commits in 16b097879b6f117c8ae698aab054c87f26ff325e..eb5d35917b2395194593c9ca70c3778f60c1573b
2022-11-14 23:28:16 +0000 to 2022-11-17 22:08:43 +0000
- Fix several tests that are waiting 60 seconds for publishing to time out (rust-lang/cargo#11388)
- Implement RFC 3139: alternative registry authentication support (rust-lang/cargo#10592)
- Fix cargo install --index when used with registry.default (rust-lang/cargo#11302)

r? `@ghost`
2022-11-19 15:35:22 +01:00
Matthias Krüger 52cc0d5360
Rollup merge of #103117 - joshtriplett:use-is-terminal, r=eholk
Use `IsTerminal` in place of `atty`

In any crate that can use nightly features, use `IsTerminal` rather than
`atty`:

- Use `IsTerminal` in `rustc_errors`
- Use `IsTerminal` in `rustc_driver`
- Use `IsTerminal` in `rustc_log`
- Use `IsTerminal` in `librustdoc`
2022-11-19 15:35:18 +01:00
bors ff0ffda6b3 Auto merge of #104591 - Manishearth:rollup-b3ser4e, r=Manishearth
Rollup of 8 pull requests

Successful merges:

 - #102977 (remove HRTB from `[T]::is_sorted_by{,_key}`)
 - #103378 (Fix mod_inv termination for the last iteration)
 - #103456 (`unchecked_{shl|shr}` should use `u32` as the RHS)
 - #103701 (Simplify some pointer method implementations)
 - #104047 (Diagnostics `icu4x` based list formatting.)
 - #104338 (Enforce that `dyn*` coercions are actually pointer-sized)
 - #104498 (Edit docs for `rustc_errors::Handler::stash_diagnostic`)
 - #104556 (rustdoc: use `code-header` class to format enum variants)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-11-18 23:20:53 +00:00
Manish Goregaokar 2721e40737 Fix lockfile 2022-11-18 14:46:52 -08:00
Charles Lew bde2f9857b Import icu locale fallback data 2022-11-18 14:46:35 -08:00
Charles Lew a775004322 Migrate diagnostics list output to use icu list formatter. 2022-11-18 14:46:35 -08:00
Weihang Lo 35f8962cee
Update cargo
3 commits in 16b097879b6f117c8ae698aab054c87f26ff325e..eb5d35917b2395194593c9ca70c3778f60c1573b
2022-11-14 23:28:16 +0000 to 2022-11-17 22:08:43 +0000
- Fix several tests that are waiting 60 seconds for publishing to time out (rust-lang/cargo#11388)
- Implement RFC 3139: alternative registry authentication support (rust-lang/cargo#10592)
- Fix cargo install --index when used with registry.default (rust-lang/cargo#11302)
2022-11-18 21:37:17 +00:00
bors b833ad56f4 Auto merge of #104573 - matthiaskrgr:rollup-k36ybtp, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #101162 (Migrate rustc_resolve to use SessionDiagnostic, part # 1)
 - #103386 (Don't allow `CoerceUnsized` into `dyn*` (except for trait upcasting))
 - #103405 (Detect incorrect chaining of if and if let conditions and recover)
 - #103594 (Fix non-associativity of `Instant` math on `aarch64-apple-darwin` targets)
 - #104006 (Add variant_name function to `LangItem`)
 - #104494 (Migrate GUI test to use functions)
 - #104516 (rustdoc: clean up sidebar width CSS)
 - #104550 (fix a typo)

Failed merges:

 - #104554 (Use `ErrorGuaranteed::unchecked_claim_error_was_emitted` less)

r? `@ghost`
`@rustbot` modify labels: rollup
2022-11-18 20:26:58 +00:00
Matthias Krüger 3e5965722c
Rollup merge of #101162 - rajputrajat:master, r=davidtwco
Migrate rustc_resolve to use SessionDiagnostic, part # 1

crate a somewhat on larger size, so plz allow some time to get it finished.
2022-11-18 14:13:35 +01:00
Ralf Jung 4101889786 interpret: use Either over Result when it is not representing an error condition 2022-11-18 10:18:32 +01:00
Nicholas Nethercote 67d5cc0462 Use ThinVec in ast::Path. 2022-11-17 13:56:38 +11:00
bors e9493d63c2 Auto merge of #104456 - RalfJung:miri, r=RalfJung
update Miri

Not a huge sync, but there was a conflict and [josh](https://github.com/josh-project/josh/) seems to prefer those to be merged back ASAP.
2022-11-16 19:52:45 +00:00
Ralf Jung 157b2d5436 ensure rand has its default features enabled 2022-11-16 16:13:55 +01:00
Weihang Lo de53bd3eef
Update cargo
5 commits in a3dfea71ca0c888a88111086898aa833c291d497..16b097879b6f117c8ae698aab054c87f26ff325e
2022-11-11 03:50:47 +0000 to 2022-11-14 23:28:16 +0000
- improve error message for cargo add/remove (rust-lang/cargo#11375)
- Bump crate versions of `cargo-util` and `crates-io` (rust-lang/cargo#11369)
- doc(changelog): suggestions of cargo fix are nightly only (rust-lang/cargo#11373)
- Add warning when PATH env separator is in project path (rust-lang/cargo#11318)
- Fix git2 safe-directory disable (rust-lang/cargo#11366)
2022-11-16 00:11:19 +00:00
Ralf Jung 5516273805 update lockfile 2022-11-15 20:06:42 +01:00
Pietro Albini 4af7de13d2
initial prototype of the tool to generate copyright notices 2022-11-15 15:02:03 +01:00
Pietro Albini 13efb20846
add tool to collect license metadata from REUSE 2022-11-15 14:50:20 +01:00
Matthias Krüger c389097693
Rollup merge of #104378 - compiler-errors:chalk-up, r=jackh726
Bump chalk to v0.87

1. Removes `ReEmpty` from chalk
2. Adds support for the `std::marker::Tuple` trait
2022-11-14 19:26:19 +01:00
Manish Goregaokar c9fc5cbeb5
Rollup merge of #103744 - palfrey:unwind-upgrade-cc, r=Mark-Simulacrum
Upgrade cc for working is_flag_supported on cross-compiles

https://github.com/rust-lang/rust/pull/85806 fixed unwind v.s gcc support on later Android ndks using `is_flag_supported`. However, due to https://github.com/rust-lang/cc-rs/issues/675, this didn't work properly on cross-compiles. 3eeb50b391 fixes this, and was released in cc 1.0.74, hence the upgrade
2022-11-13 21:49:24 -05:00
Michael Goulet 6de5f6277e Bump chalk to v0.87 2022-11-13 19:29:38 +00:00
Rajput, Rajat 269ce369fe migrating rustc_resolve to SessionDiagnostic. work in progress. start
implement binding_shadows

migrate till self-in-generic-param-default

use braces in fluent message as suggested by @compiler-errors.

to fix lock file issue reported by CI

migrate 'unreachable label' error

run formatter

name the variables correctly in fluent file

SessionDiagnostic -> Diagnostic

test "pattern/pat-tuple-field-count-cross.rs" passed

test "resolve/bad-env-capture2.rs" passed

test "enum/enum-in-scope.rs" and other depended on "resolve_binding_shadows_something_unacceptable" should be passed now.

fix crash errors while running test-suite. there might be more.

then_some(..) suits better here.

all tests passed

convert TraitImpl and InvalidAsm. TraitImpl is buggy yet. will fix after receiving help from Zulip

migrate "Ralative-2018"

migrate "ancestor only"

migrate "expected found"

migrate "Indeterminate"

migrate "module only"

revert to the older implementation for now. since this is failing at the moment.

follow the convension for fluent variable

order the diag attribute as suggested in review comment

fix merge error. migrate trait-impl-duplicate

make the changes compatible with "Flatten diagnostic slug modules #103345"

fix merge

remove commented code

merge issues

fix review comments

fix tests
2022-11-13 19:39:26 +05:30
Weihang Lo 934c4141cc
Update cargo
9 commits in 9286a1beba5b28b115bad67de2ae91fb1c61eb0b..a3dfea71ca0c888a88111086898aa833c291d497
2022-11-04 06:41:49 +0000 to 2022-11-11 03:50:47 +0000
- fix: return non UTF-8 error message (rust-lang/cargo#11321)
- Extract `two_kinds_of_msg_format_err` message to de-duplicate it (rust-lang/cargo#11358)
- Propagate change of artifact bin dep to its parent fingerprint (rust-lang/cargo#11353)
- Fix not a hyperlink warnings (rust-lang/cargo#11357)
- Fix wait-for-publish with sparse registry (rust-lang/cargo#11356)
- Add `rm` alias to configuration docs (rust-lang/cargo#11351)
- Add `registries.crates-io.protocol` docs (rust-lang/cargo#11350)
- test(features2): test to prevent regressing of optional host deps of dep (rust-lang/cargo#11342)
- Bump to 0.68.0, update changelog (rust-lang/cargo#11340)
2022-11-11 22:07:34 +00:00
Tom Parker-Shemilt 18129b67a0 Upgrade cc to 1.0.76 2022-11-09 21:52:10 +00:00
bors e75aab045f Auto merge of #104131 - notriddle:notriddle/flate2, r=Mark-Simulacrum
Update to latest version of flate2
2022-11-09 20:25:28 +00:00
Manish Goregaokar 83e73e013d
Rollup merge of #103778 - mati865:update-deps, r=Mark-Simulacrum
Update several crates for improved support of the new targets

This helps with `*-windows-gnullvm` targets by reducing amount of patching.
2022-11-08 21:03:54 -05:00
Michael Howell 8e71a13022 Update to latest version of flate2 2022-11-07 17:13:20 -07:00
bors 73c9eaf214 Auto merge of #103934 - notriddle:notriddle/backtrace-deps, r=Mark-Simulacrum
std: sync "Dependencies of the `backtrace` crate" with `backtrace`

Compare:

07872f28cd/Cargo.toml (L43)

160b194295/library/std/Cargo.toml (L26)
2022-11-07 20:05:09 +00:00
Mateusz Mikuła d5899efbda Update several crates for improved support of the new targets
This helps with `*-windows-gnullvm` targets
2022-11-05 12:19:55 +01:00
bors 452cf4f710 Auto merge of #103998 - Dylan-DPC:rollup-2nbmtc9, r=Dylan-DPC
Rollup of 6 pull requests

Successful merges:

 - #103621 (Correctly resolve Inherent Associated Types)
 - #103660 (improve `filesearch::get_or_default_sysroot`)
 - #103866 (Remove some return-type diagnostic booleans from `FnCtxt`)
 - #103867 (Remove `has_errors` from `FnCtxt`)
 - #103994 (Specify that `break` cannot be used outside of loop *or* labeled block)
 - #103995 (Small round of typo fixes)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-11-05 07:32:09 +00:00
Dylan DPC bd9e6e05d2
Rollup merge of #103660 - ozkanonur:master, r=jyn514
improve `filesearch::get_or_default_sysroot`

`fn get_or_default_sysroot` is now improved and used in `miri` and `clippy`, and tests are still passing as they should. So we no longer need to implement custom workarounds/hacks to find sysroot in tools like miri/clippy.

Resolves https://github.com/rust-lang/rust/issues/98832

re-opened from #103581
2022-11-05 11:31:28 +05:30
Weihang Lo bfce227c6a
Update cargo
20 commits in 7e484fc1a766f56dbc95380f45719698e0c82749..9286a1beba5b28b115bad67de2ae91fb1c61eb0b
2022-10-27 15:20:57 +0000 to 2022-11-04 06:41:49 +0000
- chore: Upgrade dependencies (rust-lang/cargo#11328)
- Clean more aggressively in CI (rust-lang/cargo#11335)
- Remove remove_dir_all (rust-lang/cargo#11333)
- test(publish): Cover more wait-for-publish cases (rust-lang/cargo#11327)
- Revert rust-lang/cargo#11183 (rust-lang/cargo#11331)
- fix(semver-check): adapt to a different error for variant not covered (rust-lang/cargo#11332)
- Update curl-sys (rust-lang/cargo#11326)
- Mention fix on build script deadlock (rust-lang/cargo#11325)
- Make cargo forward pre-existing CARGO if set (rust-lang/cargo#11285)
- Clean up workspace dependencies after cargo remove (rust-lang/cargo#11242)
- Update the outdated link for rust-semverver (rust-lang/cargo#11322)
- Fix broken link to compilation entry point (rust-lang/cargo#11317)
- Only remove fingerprints and build script artifacts of the requested package (rust-lang/cargo#10621)
- Newer anyhow features are required (rust-lang/cargo#11316)
- Clean stale git temp files (rust-lang/cargo#11308)
- Report crate size on package and publish (rust-lang/cargo#11270)
- add a note that some warnings (and/or errors) can be auto-fixed (rust-lang/cargo#10989)
- Update libcurl (rust-lang/cargo#11307)
- artifact deps shoud works when target field specified coexists with `optional = true` (rust-lang/cargo#11183)
- Fix singular verb in tests page (rust-lang/cargo#11300)
2022-11-04 23:51:04 +00:00
Matthias Krüger 82d7de837c
Rollup merge of #103958 - chenyukang:yukang/fix-103951-count-limit, r=jyn514
Test tidy should not count untracked paths towards entries limit

Fixes #103951
r? `@jyn514`
2022-11-04 18:52:28 +01:00
Matthias Krüger dabb6c6bd7
Rollup merge of #103367 - chbaker0:update-std-getrandom, r=thomcc
Remove std's transitive dependency on cfg-if 0.1

After https://github.com/rust-lang/rust/pull/101946 this completes the move to cfg-if 1.0 by:
* Updating getrandom 0.1.14->0.1.16
* Updating panic_abort's and unwind's dep to cfg-if 1.0

Fixes https://github.com/rust-lang/rust/issues/103365
2022-11-04 18:52:25 +01:00
Onur Özkan 71a3a48ee5 improve filesearch::get_or_default_sysroot r=ozkanonur
Signed-off-by: Onur Özkan <work@onurozkan.dev>
2022-11-04 17:06:47 +03:00
yukang 18511ba1cb test tidy should not count untracked paths towards entries limit 2022-11-04 21:48:56 +08:00
Michael Howell cf83a1d81b std: sync "Dependencies of the backtrace crate" with backtrace
Compare:

07872f28cd/Cargo.toml (L43)

160b194295/library/std/Cargo.toml (L26)
2022-11-03 10:10:15 -07:00
Michael Howell 03968a802c rustdoc: use ThinVec for cleaned generics 2022-11-02 16:17:22 -07:00
Weihang Lo 331aa45093
Update cargo
14 commits in 7e484fc1a766f56dbc95380f45719698e0c82749..810cbad9a123ad4ee0a55a96171b8f8478ff1c03
2022-10-27 15:20:57 +0000 to 2022-11-02 21:04:31 +0000
- Update curl-sys (rust-lang/cargo#11326)
- Mention fix on build script deadlock (rust-lang/cargo#11325)
- Make cargo forward pre-existing CARGO if set (rust-lang/cargo#11285)
- Clean up workspace dependencies after cargo remove (rust-lang/cargo#11242)
- Update the outdated link for rust-semverver (rust-lang/cargo#11322)
- Fix broken link to compilation entry point (rust-lang/cargo#11317)
- Only remove fingerprints and build script artifacts of the requested package (rust-lang/cargo#10621)
- Newer anyhow features are required (rust-lang/cargo#11316)
- Clean stale git temp files (rust-lang/cargo#11308)
- Report crate size on package and publish (rust-lang/cargo#11270)
- add a note that some warnings (and/or errors) can be auto-fixed (rust-lang/cargo#10989)
- Update libcurl (rust-lang/cargo#11307)
- artifact deps shoud works when target field specified coexists with `optional = true` (rust-lang/cargo#11183)
- Fix singular verb in tests page (rust-lang/cargo#11300)
2022-11-02 23:17:17 +00:00
Collin Baker dfab01b6e0 Remove std's transitive dependency on cfg-if 0.1
After rust-lang/rust#101946 this completes the move to cfg-if 1.0 by:
* Updating getrandom 0.1.14->0.1.16
* Updating panic_abort, panic_unwind, and unwind to cfg-if 1.0
2022-11-02 18:01:20 -04:00
Dylan DPC f7110e14b8
Rollup merge of #103275 - Manishearth:tinystrup, r=pnkfelix
Update tinystr

Tinystr has changed a ton since the old version and is much less unsafe, updated some of the dependencies that use it.
2022-11-02 22:32:02 +05:30
Jakob Degen 17395b45b1 Detect unused files in src/test/mir-opt and error on them in tidy. 2022-10-31 21:45:41 -07:00
Tom Parker-Shemilt a9d7cfc480 Update cc in Cargo.lock 2022-10-29 23:21:12 +01:00
bors 85d089b41e Auto merge of #103392 - RalfJung:miri, r=oli-obk
update Miri

I had to use a hacked version of josh to create this, so let's be careful with merging this and maybe wait a bit to see if the josh issue becomes more clear. But the history looks good to me, we are not adding duplicates of rustc commits that were previously mirrored to Miri.

Also I want to add some cross-testing of Miri in x.py.
2022-10-25 12:33:39 +00:00
Yuki Okushi 413380fc20
Rollup merge of #103277 - thomcc:bump-libc-135, r=Mark-Simulacrum
Update libstd's libc to 0.2.135 (to make `libstd` no longer pull in `libiconv.dylib` on Darwin)

This is to pull in https://github.com/rust-lang/libc/pull/2944.

It's related to https://github.com/rust-lang/rust/pull/102766, in that they both remove unused dylibs from libstd on Darwin platforms. As a result, I'm marking this as relnotes since everybody agreed it was good to add it to the other as well. (The note should be about no longer linking against libiconv -- the libc update is irrelevant).

Might as well have the same reviewer too.

r? `@Mark-Simulacrum`
2022-10-24 19:32:27 +09:00
Ralf Jung 64f56d238c update lockfile 2022-10-24 11:49:32 +02:00
Weihang Lo 9926f6e427
Update cargo
5 commits in 3ff044334f0567ce1481c78603aeee7211b91623..071eeaf210708219a5a1b2c4728ca2f97df7f2ae
2022-10-17 20:25:00 +0000 to 2022-10-22 01:17:55 +0000

- fix: Remove leading newline in vendor output (rust-lang/cargo#11273)
- Fix publishing with a dependency on a sparse registry (rust-lang/cargo#11268)
- Add missing edition (rust-lang/cargo#11265)
- fix(publish): Check remote git registry more than once post-publish (rust-lang/cargo#11255)
- Fix typo (rust-lang/cargo#11258)
2022-10-22 20:06:07 +08:00
lcnr fb3ab13a1c rustc_hir_typeck: fix paths and partially mv files 2022-10-20 17:53:14 +02:00
Thom Chiovoloni 4b66432268
Update libstd's libc to 0.2.135 2022-10-19 17:54:55 -07:00
Manish Goregaokar 288194ec88 Update tinystr 2022-10-19 16:24:42 -07:00
Josh Triplett e3d44dd4bd Use IsTerminal in librustdoc 2022-10-16 15:10:40 +01:00
Josh Triplett d60ba29b10 Use IsTerminal in rustc_log 2022-10-16 15:10:40 +01:00
Josh Triplett c5ad97da25 Use IsTerminal in rustc_errors 2022-10-16 15:10:40 +01:00
Yuki Okushi 3c0ea4af8b
Rollup merge of #103033 - alyssais:pkg-config, r=joshtriplett
Update pkg-config

I'd like to be able to cross-compile rustc in a scenario where it'd be really helpful to have cd3ccca7c3.  I've done some test builds of the compiler on x86_64 linux, targeting x86_64 linux and aarch64 linux.
2022-10-16 11:41:13 +09:00
Weihang Lo 40bb4b740b
Update cargo
12 commits in b8f30cb23c4e5f20854a4f683325782b7cff9837..b332991a57c9d055f1864de1eed93e2178d49440
2022-10-10 19:16:06 +0000 to 2022-10-13 22:05:28 +0000
- Differentiate the warning when an alias (built-in or user-defined) shadows an external subcommand (rust-lang/cargo#11170)
- chore: Update tests for latest clap (rust-lang/cargo#11235)
- feat(publish): Support 'publish.timeout' config behind '-Zpublish-timeout' (rust-lang/cargo#11230)
- Add missing edition (rust-lang/cargo#11231)
- doc(profiles): add module level doc (rust-lang/cargo#11219)
- refactor(publish): Clarify which SourceId is being used (rust-lang/cargo#11216)
- Add new SourceKind::SparseRegistry to differentiate sparse registries (rust-lang/cargo#11209)
- Fix deadlock when build scripts are waiting for input on stdin (rust-lang/cargo#11205)
- refactor: New variant `FeaturesFor::ArtifactDep` (rust-lang/cargo#11184)
- Fix rustdoc warning about unclosed HTML tag (rust-lang/cargo#11221)
- refactor(tests): Prepare for wait-for-publish test changes (rust-lang/cargo#11210)
- Add configuration option for controlling crates.io protocol (rust-lang/cargo#11215)
2022-10-14 09:59:15 +01:00
Alyssa Ross b3b6fbc834
Update pkg-config 2022-10-14 01:42:23 +00:00
bors cde693cf96 Auto merge of #102894 - RalfJung:compiler_builtins, r=Amanieu
update compiler_builtins

r? `@Amanieu`
2022-10-11 14:04:59 +00:00
Ralf Jung a52cde3da5 update compiler_builtins 2022-10-10 20:13:45 +02:00
Andres Suarez a65ddf06e0 update to syn-1.0.102 2022-10-09 13:51:55 -04:00
Cameron Steffen ff940db666 Rewrite representability 2022-10-07 09:33:46 -05:00
Philipp Krones db490d0f84
Update Cargo.lock 2022-10-06 09:45:08 +02:00
bors 27579a214d Auto merge of #102573 - RalfJung:mirisync, r=oli-obk
Miri sync

This is a Miri sync created with my experimental fork of josh. We should probably not merge this yet, but we can use this to check if the sync looks the way it should.

r? `@oli-obk`
2022-10-06 00:00:29 +00:00
bors 8c71b67159 Auto merge of #98736 - alex:lipo-magic, r=bjorn3
resolve error when attempting to link a universal library on macOS

Previously attempting to link universal libraries into libraries (but not binaries) would produce an error that "File too small to be an archive". This works around this by invoking `lipo -thin` to extract a library for the target platform when passed a univeral library.

Fixes #55235

It's worth acknowledging that this implementation is kind of a horrible hack. Unfortunately I don't know how to do anything better, hopefully this PR will be a jumping off point.
2022-10-05 11:41:40 +00:00
Weihang Lo c1b4f11e36
Update cargo
8 commits in f5fed93ba24607980647962c59863bbabb03ce14..0b84a35c2c7d70df4875a03eb19084b0e7a543ef
2022-09-27 12:03:57 +0000 to 2022-10-03 19:13:21 +0000

- Provide a better error message when mixing dep: with / (rust-lang/cargo#11172)
- Remove lingering unstable flag `-Zfeatures` (rust-lang/cargo#11168)
- Tweak wording (rust-lang/cargo#11164)
- Expose libgit2-sys/vendored feature as vendored-libgit2 (rust-lang/cargo#11162)
- refactor(cli): Upgrade to clap v4 (rust-lang/cargo#11159)
- Expose guide to adding a new edition as rustdoc (rust-lang/cargo#11157)
- Remove `multitarget` from -Zhelp (rust-lang/cargo#11158)
- Remove outdated comments (rust-lang/cargo#11155)
2022-10-04 21:57:49 +01:00
Ralf Jung 9cc11e262f test Miri changes in PR CI; we no longer need xargo 2022-10-04 17:31:49 +02:00
Alex Gaynor c65c36242e
resolve error when attempting to link a universal library on macOS
Previously attempting to link universal libraries into libraries (but not binaries) would produce an error that "File too small to be an archive". This works around this by using `object` to extract a library for the target platform when passed a univeral library.

Fixes #55235
2022-10-04 07:39:51 -04:00
Cameron Steffen 95b689b1d5 Move utils from rustc_middle to rustc_ty_utils 2022-10-03 09:12:03 -05:00
bors 09ae7846a2 Auto merge of #101619 - Xiretza:rustc_parse-session-diagnostics, r=davidtwco
Migrate more of rustc_parse to SessionDiagnostic

Still far from complete, but I thought I'd add a checkpoint here because rebasing was starting to get annoying.
2022-09-28 11:11:42 +00:00
Xiretza 8489a67f0b Implement IntoDiagnosticArg for rustc_ast::Path 2022-09-27 20:29:18 +02:00
Weihang Lo 5095f54219
Update cargo
22 commits in 73ba3f35e0205844418260722c11602113179c4a..f5fed93ba24607980647962c59863bbabb03ce14
2022-09-18 06:38:16 +0000 to 2022-09-27 12:03:57 +0000

- build-scripts.md: Use em dash consistently. (rust-lang/cargo#11150)
- Indicate how Cargo locates the manifest (rust-lang/cargo#10770)
- Reduce references to `[project]` within cargo (rust-lang/cargo#11135)
- Iteratively construct target cfg (rust-lang/cargo#11114)
- update comment about `CARGO_BIN_EXE_` (rust-lang/cargo#11146)
- Call out that not all config values can be set via env vars (rust-lang/cargo#11139)
- Bump to 0.67.0, update changelog (rust-lang/cargo#11137)
- ci: update toolchain for building api doc (rust-lang/cargo#11134)
- Http publish not noop (rust-lang/cargo#11111)
- Improve errors for TOML fields that support workspace inheritance (rust-lang/cargo#11113)
- switch to `std::task::ready!()` where possible (rust-lang/cargo#11130)
- Report cmd aliasing failure with more contexts (rust-lang/cargo#11087)
- minor: remove unused mut (rust-lang/cargo#11127)
- fix(cli): Forward non-UTF8 arguments to external subcommands (rust-lang/cargo#11118)
- This change adds an example to the authors attribute in the manifest. (rust-lang/cargo#10938)
- Add support for relative git submodule paths (rust-lang/cargo#11106)
- make unknown features on `cargo add` more discoverable (rust-lang/cargo#11098)
- Unlink old final artifacts before compilation (rust-lang/cargo#11122)
- refactor(cli): Prepare for clap v4 (rust-lang/cargo#11116)
- fix(cli): Error trailing args rather than ignore (rust-lang/cargo#11119)
- Add a minor clarification (rust-lang/cargo#11093)
- doc(changelog): mention CVE fixes (rust-lang/cargo#11104)
2022-09-27 17:46:42 +01:00
lcnr 1fc86a63f4 rustc_typeck to rustc_hir_analysis 2022-09-27 10:37:23 +02:00
fee1-dead 07467c5308
Rollup merge of #101997 - cuviper:drop-legacy-pm, r=nikic
Remove support for legacy PM

This removes support for optimizing with LLVM's legacy pass manager, as well as the unstable `-Znew-llvm-pass-manager` option. We have been defaulting to the new PM since LLVM 13 (except for s390x that waited for 14), and LLVM 15 removed support altogether. The only place we still use the legacy PM is for writing the output file, just like `llc` does.

cc #74705
r? ``@nikic``
2022-09-25 22:06:38 +08:00
khyperia 9a206a78eb Improve the help message for an invalid calling convention 2022-09-22 22:18:30 +02:00
Josh Stone 2860f77a0d Remove support for LLVM's legacy pass manager 2022-09-18 13:25:49 -07:00
Matthias Krüger 46ebe7cf41
Rollup merge of #101912 - crlf0710:compiler_update_unicode_15, r=Manishearth
Update `unicode-rs` crates to Unicode 15

r? `@Manishearth`
2022-09-18 02:55:29 +02:00