about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-02-21Make `create_dir_all_bare` an std integration testChris Denton-23/+97
Moving `create_dir_all` out of `ui-fulldeps` is complicated by the fact it sets the current directory. This means it can't be a unit test. Instead, move it to its own integration test.
2023-02-21Move `rename_directory` from ui-fulldeps to stdChris Denton-30/+16
std has had a `TempDir` implementation for a long time now.
2023-02-21Move std tests/ui-fulldeps into a std subdirectoryChris Denton-0/+0
2023-02-19Auto merge of #107772 - compiler-errors:dyn-star-backend-is-ptr, r=eholkbors-95/+129
Make `dyn*`'s value backend type a pointer One tweak on top of Ralf's commit should fix using `usize` as a `dyn*`-coercible type, and should fix when we're using various other pointer types when LLVM opaque pointers is disabled. r? `@eholk` but feel free to reassign cc https://github.com/rust-lang/rust/pull/107728#issuecomment-1421231823 `@RalfJung`
2023-02-19Auto merge of #107867 - compiler-errors:new-solver-fn-trait-safety, r=lcnrbors-74/+135
Check that built-in callable types validate their output type is `Sized` (in new solver) Working on parity with old solver. Putting this up for consideration, it's not *really* needed or anything just yet. Maybe it's better to approach this from another direction (like always checking the item bounds when calling `consider_assumption`? we may need that for coinduction to be sound though?) This basically implements #100096 for the new solver.
2023-02-18Auto merge of #107542 - ↵bors-7/+23
compiler-errors:param-envs-with-inference-vars-are-cursed, r=jackh726 Don't call `with_reveal_all_normalized` in const-eval when `param_env` has inference vars in it **what:** This slightly shifts the order of operations from an existing hack: https://github.com/rust-lang/rust/blob/5b6ed253c42a69b93e7447fb0874a89ab6bc1cfb/compiler/rustc_middle/src/ty/consts/kind.rs#L225-L230 in order to avoid calling a tcx query (`TyCtxt::reveal_opaque_types_in_bounds`, via `ParamEnv::with_reveal_all_normalized`) when a param-env has inference variables in it. **why:** This allows us to enable fingerprinting of query keys/values outside of incr-comp in deubg mode, to make sure we catch other places where we're passing infer vars and other bad things into query keys. Currently that (bbf33836b9adfe4328aefa108c421e670a3923b7) crashes because we introduce inference vars into a param-env in the blanket-impl finder in rustdoc :sweat: https://github.com/rust-lang/rust/blob/5b6ed253c42a69b93e7447fb0874a89ab6bc1cfb/src/librustdoc/clean/blanket_impl.rs#L43 See the CI failure here: https://github.com/rust-lang/rust/actions/runs/4058194838/jobs/6984834619
2023-02-18Auto merge of #106241 - Sp00ph:vec_deque_iter_methods, r=the8472bors-2/+329
Implement more methods for `vec_deque::IntoIter` This implements a couple `Iterator` methods on `vec_deque::IntoIter` (`(try_)fold`, `(try_)rfold` `advance_(back_)by`, `next_chunk`, `count` and `last`) to allow these to be more efficient than their default implementations, also allowing many other `Iterator` methods that use these under the hood to take advantage of these manual implementations. `vec::IntoIter` has similar implementations for many of these methods. This PR does not yet implement `TrustedRandomAccess` and friends, as I'm not very familiar with the required safety guarantees. r? `@the8472` (since you also took over my last PR)
2023-02-18Emit the right types for vtable pointers when dropping dyn*Michael Goulet-80/+78
2023-02-18Make dyn* have the same scalar pair ABI as corresponding fat pointerMichael Goulet-2/+9
2023-02-18Add codegen testMichael Goulet-0/+7
2023-02-18Use inttoptr to support usize as dyn* value, use pointercast to make sure ↵Michael Goulet-0/+31
pointers are compatible
2023-02-18Add consider_implied_clauseMichael Goulet-102/+97
2023-02-18Check that built-in callable types validate their output type is `Sized` (in ↵Michael Goulet-14/+80
new solver)
2023-02-18make first component of dyn* use pointer layout+type, and adjust DynStar commentRalf Jung-15/+6
2023-02-18Auto merge of #108209 - petrochenkov:doclean, r=notriddlebors-72/+61
rustdoc: Cleanup doc link extraction
2023-02-18Auto merge of #108211 - matthiaskrgr:rollup-e59onmm, r=matthiaskrgrbors-157/+427
Rollup of 6 pull requests Successful merges: - #108031 (Don't recover lifetimes/labels containing emojis as character literals) - #108046 (Don't allow evaluating queries that were fed in a previous compiler run) - #108162 (Don't eagerly convert principal to string) - #108186 (Deny non-lifetime bound vars in `for<..> ||` closure binders) - #108197 (Update cargo) - #108205 (link to llvm changes that prompted the special cases) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-02-18Rollup merge of #108205 - tshepang:why-special-case, r=cjgillotMatthias Krüger-0/+5
link to llvm changes that prompted the special cases
2023-02-18Rollup merge of #108197 - weihanglo:update-cargo, r=weihangloMatthias Krüger-15/+4
Update cargo 10 commits in 39c13e67a5962466cc7253d41bc1099bbcb224c3..17b3d0de0897e1c6b8ca347bd39f850bb0a5b9f6 2023-02-12 02:01:08 +0000 to 2023-02-17 19:45:09 +0000 - fix: unsupported protocol error on old macos version (rust-lang/cargo#11733) - Error on invalid alphanumeric token for crates.io (rust-lang/cargo#11600) - Add clippy lints (rust-lang/cargo#11722) - chore: Make dependencies alphabetical order (rust-lang/cargo#11719) - chore: bump mdbook to 0.4.27 (rust-lang/cargo#11716) - Amend `mdman` tests. (rust-lang/cargo#11715) - Run CI for macOS on nightly (rust-lang/cargo#11712) - doc: doc comments and intra-doc links for `core::compiler` (rust-lang/cargo#11711) - Ensure em dashes are recognizable in markup (rust-lang/cargo#11646) - Set CARGO_BIN_NAME environment variable also for binary examples (rust-lang/cargo#11705) r? `@ghost`
2023-02-18Rollup merge of #108186 - ↵Matthias Krüger-102/+210
compiler-errors:closures-with-late-bound-types-r-bad, r=cjgillot Deny non-lifetime bound vars in `for<..> ||` closure binders Moves the check for illegal bound var types from astconv to resolve_bound_vars. If a binder is defined to have a type or const late-bound var that's not allowed, we'll resolve any usages to ty error or const error values, so we shouldn't ever see late-bound types or consts in places they aren't expected. Fixes #108184 Fixes #108181 Fixes #108192
2023-02-18Rollup merge of #108162 - clubby789:issue-108155, r=NilstriebMatthias Krüger-4/+24
Don't eagerly convert principal to string Fixes #108155 ~~I haven't yet been able to reproduce the ICE in a minimal example unfortunately.~~ Added a test
2023-02-18Rollup merge of #108046 - oli-obk:no_evaluating_fed_queries, r=cjgillotMatthias Krüger-19/+6
Don't allow evaluating queries that were fed in a previous compiler run r? `@cjgillot` this code was already unreachable. Also we removed the no_hash + feeding restriction in https://github.com/rust-lang/rust/pull/105220.
2023-02-18Rollup merge of #108031 - jieyouxu:issue-108019, r=estebankMatthias Krüger-17/+178
Don't recover lifetimes/labels containing emojis as character literals Fixes #108019. Note that at the time of this commit, `unic-emoji-char` seems to have data tables only up to Unicode 5.0, but Unicode is already newer than this. A newer emoji such as `🥺` will not be recognized as an emoji but older emojis such as `🐱` will. This PR leaves a couple of FIXMEs where `unic_emoji_char::is_emoji` is used.
2023-02-18doc links: Filter away autolinks in both rustc and rustdocVadim Petrochenkov-18/+27
2023-02-18rustdoc: Cleanup broken link callbacksVadim Petrochenkov-58/+43
2023-02-18rustdoc: Do not use Footnotes and HeadingLinks when extracting doc linksVadim Petrochenkov-8/+3
they do not add any `Link` events
2023-02-18Auto merge of #107329 - joboet:optimize_lazylock, r=m-ou-sebors-17/+120
Optimize `LazyLock` size The initialization function was unnecessarily stored separately from the data to be initialized. Since both cannot exist at the same time, a `union` can be used, with the `Once` acting as discriminant. This unfortunately requires some extra methods on `Once` so that `Drop` can be implemented correctly and efficiently. `@rustbot` label +T-libs +A-atomic
2023-02-18add a summary, in addition to the linkTshepang Mbambo-2/+5
2023-02-18link to llvm changes that prompted the special casesTshepang Mbambo-0/+2
2023-02-18Auto merge of #106476 - ↵bors-10/+49
keith:ks/add-sanitizer-support-for-modern-ios-platforms, r=badboy Add sanitizer support for modern iOS platforms asan and tsan generally support iOS, but that previously wasn't configured in rust. This only adds support for the simulator architectures, and arm64 device architecture, not the older 32 bit architectures.
2023-02-18Add addl testMichael Goulet-0/+24
2023-02-18Move late-bound arg type checks to resolve_bound_varsMichael Goulet-87/+171
2023-02-18Auto merge of #99679 - repnop:kernel-address-sanitizer, r=cuviperbors-12/+142
Add `kernel-address` sanitizer support for freestanding targets This PR adds support for KASan (kernel address sanitizer) instrumentation in freestanding targets. I included the minimal set of `x86_64-unknown-none`, `riscv64{imac, gc}-unknown-none-elf`, and `aarch64-unknown-none` but there's likely other targets it can be added to. (`linux_kernel_base.rs`?) KASan uses the address sanitizer attributes but has the `CompileKernel` parameter set to `true` in the pass creation.
2023-02-18Adjust tracking issue for non_lifetime_bindersMichael Goulet-15/+15
2023-02-18Auto merge of #108112 - nnethercote:clarify-iterator-interners, ↵bors-186/+173
r=oli-obk,compiler-errors Clarify iterator interners I found the iterator interners very confusing. This PR clarifies things. r? `@compiler-errors`
2023-02-17Update cargoWeihang Lo-15/+4
10 commits in 39c13e67a5962466cc7253d41bc1099bbcb224c3..17b3d0de0897e1c6b8ca347bd39f850bb0a5b9f6 2023-02-12 02:01:08 +0000 to 2023-02-17 19:45:09 +0000 - fix: unsupported protocol error on old macos version (rust-lang/cargo#11733) - Error on invalid alphanumeric token for crates.io (rust-lang/cargo#11600) - Add clippy lints (rust-lang/cargo#11722) - chore: Make dependencies alphabetical order (rust-lang/cargo#11719) - chore: bump mdbook to 0.4.27 (rust-lang/cargo#11716) - Amend `mdman` tests. (rust-lang/cargo#11715) - Run CI for macOS on nightly (rust-lang/cargo#11712) - doc: doc comments and intra-doc links for `core::compiler` (rust-lang/cargo#11711) - Ensure em dashes are recognizable in markup (rust-lang/cargo#11646) - Set CARGO_BIN_NAME environment variable also for binary examples (rust-lang/cargo#11705)
2023-02-17Auto merge of #105274 - saethlin:instcombine-mut-ref, r=cjgillotbors-31/+9
Enable instcombine for mutable reborrows `instcombine` used to contain this comment, which is no longer accurate because there it is fine to copy `&mut _` in MIR: ```rust // The dereferenced place must have type `&_`, so that we don't copy `&mut _`. ``` So let's try replacing that check with something much more permissive...
2023-02-17Auto merge of #108075 - WaffleLapkin:de-arena-allocates-you-OwO, r=Nilstriebbors-101/+93
Remove `arena_cache` modifier from `associated_item` query & copy `ty::AssocItem` instead of passing by ref r? `@ghost`
2023-02-17Don't allow evaluating queries that were fed in a previous compiler runOli Scherer-19/+6
2023-02-17Don't eagerly convert principal to stringclubby789-4/+24
2023-02-17Auto merge of #108159 - matthiaskrgr:rollup-5k2j7cx, r=matthiaskrgrbors-42/+167
Rollup of 6 pull requests Successful merges: - #107592 (Default `repr(C)` enums to `c_int` size) - #107956 (Copy `bin/*` and `lib/*.dylib` files to `stage0-sysroot`) - #108126 (fix a line, and do a consistency fix) - #108144 (Add compiler-errors to a few more triagebot groups) - #108149 (typo) - #108154 (`BasicBlock::new(0)` -> `START_BLOCK` [no functional changes]) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-02-17Rollup merge of #108154 - scottmcm:start-block-cleanup, r=compiler-errorsMatthias Krüger-12/+12
`BasicBlock::new(0)` -> `START_BLOCK` [no functional changes]
2023-02-17Rollup merge of #108149 - tshepang:typo, r=Dylan-DPCMatthias Krüger-1/+1
typo
2023-02-17Rollup merge of #108144 - compiler-errors:triagebot-more, r=Mark-SimulacrumMatthias Krüger-1/+3
Add compiler-errors to a few more triagebot groups Self-explanatory
2023-02-17Rollup merge of #108126 - tshepang:nits, r=lcnrMatthias Krüger-3/+4
fix a line, and do a consistency fix
2023-02-17Rollup merge of #107956 - KittyBorgX:master, r=ozkanonurMatthias Krüger-0/+66
Copy `bin/*` and `lib/*.dylib` files to `stage0-sysroot` Fixes #101691
2023-02-17Rollup merge of #107592 - workingjubilee:use-16-bit-enum-on-16-bit-targets, ↵Matthias Krüger-25/+81
r=WaffleLapkin Default `repr(C)` enums to `c_int` size This is what ISO C strongly implies this is correct, and many processor-specific ABIs imply or mandate this size, so "everyone" (LLVM, gcc...) defaults to emitting enums this way. However, this is by no means guaranteed by ISO C, and the bare-metal Arm targets show it can be overridden, which rustc supports via `c-enum-min-bits` in a target.json. The override is a flag named `-fshort-enums` in clang and gcc, but introducing a CLI flag is probably unnecessary for rustc. This flag can be used by non-Arm microcontroller targets, like AVR and MSP430, but it is not enabled for them by default. Rust programmers who know the size of a target's enums can use explicit reprs, which also lets them match C23 code. This change is most relevant to 16-bit targets: AVR and MSP430. Most of rustc's targets use 32-bit ints, but ILP64 does exist. Regardless, rustc should now correctly handle enums for both very small and very large targets. Thanks to William for confirming MSP430 behavior, and to Waffle for better style and no-core `size_of` asserts. Fixes rust-lang/rust#107361 Fixes rust-lang/rust#77806
2023-02-17Auto merge of #107965 - BoxyUwU:add_const_arg_has_type_predicate, ↵bors-15/+183
r=compiler-errors Add `Clause::ConstArgHasType` Currently the way that we check that a const arg has the correct type for the const param it is an argument for is by setting the expected type of `typeck` on the anon const of the argument to be the const param's type. In the future for a potential `min_generic_const_exprs` we will allow providing const arguments that do not have an associated anon const that can be typeck'd which will require us to actually check that the const argument has the correct type. While it would potentially be possible to just call `eq` when creating substs this would not work if we support generics of the form `const N: T, T` (the const parameters type referencing generics declared after itself). Additionally having `ConstArgHasType` will allow us to potentially make progress on removing the `ty` field of `Const` which may be desirable. Once progress has been made on this, `ConstArgHasType` will also be helpful in ensuring we do not make mistakes in trait/impl checking by declaring functions with the wrong const parameter types as the checks that the param env is compatible would catch it. (We have messed this up in the past, and with generic const parameter types these checks will get more complex) There is a [document](https://hackmd.io/wuCS6CJBQ9-fWbwaW7nQRw?view) about the types of const generics that may provide some general information on this subject --- This PR shouldn't have any impact on whether code compiles or not on stable, it primarily exists to make progress on unstable const generics features that are desirable.
2023-02-17Avoid double-interning some `BoundVariableKind`s.Nicholas Nethercote-2/+0
This function has this line twice: ``` let bound_vars = tcx.intern_bound_variable_kinds(&bound_vars); ``` The second occurrence is effectively a no-op, because the first occurrence interned any that needed it.
2023-02-17Replace more `mk_foo` calls with `infer_foo`.Nicholas Nethercote-24/+18
2023-02-17Use `IntoIterator` for `mk_fn_sig`.Nicholas Nethercote-35/+28
This makes a lot of call sites nicer.