about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2020-09-24update testsBastian Kauschke-3/+5
2020-09-24visit impl self ty + traitBastian Kauschke-0/+25
2020-09-24assign the correct `DefId` in `nominal_obligations`Bastian Kauschke-3/+3
2020-09-24walk hir to get const evaluatable predicatesBastian Kauschke-14/+12
2020-09-24const_evaluatable_checked: collect predicates from fn_sigBastian Kauschke-1/+54
2020-09-24Auto merge of #74430 - Manishearth:stabilize-intra-doc, r=Manishearthbors-69/+107
Stabilize intra-doc links Fixes https://github.com/rust-lang/rust/issues/43466 Thanks to the great work of `@jyn514` in getting the [cross-crate reexport issue](https://github.com/rust-lang/rust/issues/65983) in intra-rustdoc links fixed, I think we're now in a position to stabilize this feature. The tracking issue currently has two unresolved issues: - <s>behavior around doc(hidden): This is fixed in https://github.com/rust-lang/rust/pull/73365, which is just waiting for CI and should land tomorrow. It's also a pretty niche bug so while I expect it to land soon I don't think we need to block stabilization on it anyway.</s> - Non-identifier primitive types like slices: This was not a part of the original RFC anyway, and is a pretty niche use case The feature itself, sans https://github.com/rust-lang/rust/issues/65983, has been shipped on nightly for three years now, with people using it on docs.rs. https://github.com/rust-lang/rust/issues/65983 itself is not an overwhelmingly central bit of functionality; the reason we elected to block stabilization on it was that back in 2017 it was not possible to fix the issue without some major refactorings of resolve, and we did not want to stabilize something that had such a potentially unfixable bug. Given that we've fixed it, I see no reason to delay stabilization on this long awaited feature. It's possible that the latest patches have problems, however we _have_ done crater runs of some of the crucial parts. Furthermore, that's what the release trains are for, we will have a solid three months to let it ride the trains before it actually hits the stable compiler. r? `@rust-lang/rustdoc`
2020-09-24Auto merge of #77083 - KodrAus:revert/const-type-id, r=RalfJungbors-4/+7
revert const_type_id stabilization This reverts #72488, which is currently on beta and scheduled to stabilize in `1.47.0`, based on https://github.com/rust-lang/rust/pull/75923#issuecomment-696676511 It turns out we might not be quite ready to stabilize `TypeId` in const contexts before having a chance to rework its internals. Since `TypeId` is a bit of an oddity we want to be careful about how those internals are currently being relied on while making changes. That will be easier to do without having to also consider compile-time contexts. r? `@eddyb`
2020-09-23Auto merge of #77102 - Dylan-DPC:rollup-2jfrg3u, r=Dylan-DPCbors-54/+203
Rollup of 9 pull requests Successful merges: - #76898 (Record `tcx.def_span` instead of `item.span` in crate metadata) - #76939 (emit errors during AbstractConst building) - #76965 (Add cfg(target_has_atomic_equal_alignment) and use it for Atomic::from_mut.) - #76993 (Changing the alloc() to accept &self instead of &mut self) - #76994 (fix small typo in docs and comments) - #77017 (Add missing examples on Vec iter types) - #77042 (Improve documentation for ToSocketAddrs) - #77047 (Miri: more informative deallocation error messages) - #77055 (Add #[track_caller] to more panicking Cell functions) Failed merges: r? `@ghost`
2020-09-23Auto merge of #76673 - simonvandel:remove-unneeded-drops, r=oli-obkbors-8/+149
MIR pass to remove unneeded drops on types not needing drop This is heavily dependent on MIR inlining running to actually see the drop statement. Do we want to special case replacing a call to std::mem::drop with a goto aswell?
2020-09-23Ignore test on wasm as it does not unwindSimon Vandel Sillesen-46/+47
2020-09-23Rollup merge of #76993 - blitzerr:alloc-ref, r=AmanieuDylan DPC-2/+3
Changing the alloc() to accept &self instead of &mut self Fixes: [#55](https://github.com/rust-lang/wg-allocators/issues/55) This is the first cut. It only makes the change for `alloc` method.
2020-09-23Rollup merge of #76965 - fusion-engineering-forks:fix-atomic-from-mut, r=AmanieuDylan DPC-1/+149
Add cfg(target_has_atomic_equal_alignment) and use it for Atomic::from_mut. Fixes some platform-specific problems with #74532 by using the actual alignment of the types instead of hardcoding a few `target_arch`s. r? @RalfJung
2020-09-23Rollup merge of #76939 - lcnr:const-evaluatable-cont, r=oli-obkDylan DPC-10/+32
emit errors during AbstractConst building There changes are currently still untested, so I don't expect this to pass CI :laughing: It seems to me like this is the direction we want to go in, though we didn't have too much of a discussion about this. r? @oli-obk
2020-09-23Rollup merge of #76898 - Aaron1011:fix/item-def-span, r=oli-obkDylan DPC-41/+19
Record `tcx.def_span` instead of `item.span` in crate metadata This was missed in PR #75465. As a result, a few places have been using the full body span of functions, instead of just the header span.
2020-09-23Auto merge of #76864 - est31:downloaded_llvm_no_clone_sources, r=Mark-Simulacrumbors-2/+3
Don't download/sync llvm-project submodule if download-ci-llvm is set llvm-project takes > 1GB storage space and a long time to download. It's better to not download it unless needed.
2020-09-23Auto merge of #76659 - simonvandel:76432, r=oli-obkbors-0/+132
SimplifyComparisonIntegral: fix miscompilation Fixes #76432 Only insert StorageDeads if we actually removed one. Fixes an issue where we added StorageDead to a place with no StorageLive r? `@oli-obk`
2020-09-23Auto merge of #76850 - ecstatic-morse:const-checking-refactor, r=oli-obkbors-162/+201
Remove `qualify_min_const_fn` ~~Blocked on #76807 (the first six commits).~~ With this PR, all checks in `qualify_min_const_fn` are replicated in `check_consts`, and the former is no longer invoked. My goal was to have as few changes to test output as possible, since making sweeping changes to the code *while* doing big batches of diagnostics updates turned out to be a headache. To this end, there's a few `HACK`s in `check_consts` to achieve parity with `qualify_min_const_fn`. The new system that replaces `is_min_const_fn` is referred to as "const-stability" My end goal for the const-stability rules is this: * Const-stability is only applicable to functions defined in `staged_api` crates. * All functions not marked `rustc_const_unstable` are considered "const-stable". - NB. This is currently not implemented. `#[unstable]` functions are also const-unstable. This causes problems when searching for feature gates. - All "const-unstable" functions have an associated feature gate * const-stable functions can only call other const-stable functions - `allow_internal_unstable` can be used to circumvent this. * All const-stable functions are subject to some additional checks (the ones that were unique to `qualify_min_const_fn`) The plan is to remove each `HACK` individually in subsequent PRs. That way, changes to error message output can be reviewed in isolation.
2020-09-22a few more &mut self -> self changesblitzerr-1/+1
2020-09-22fixing the test failureblitzerr-1/+2
2020-09-23Auto merge of #77063 - cuviper:llvm-11.0.0-rc3, r=nikicbors-0/+0
Rebase LLVM onto 11.0.0-rc3 r? `@nikic`
2020-09-23revert const_type_id stabilizationAshley Mannix-4/+7
This reverts commit e3856616ee2a894c7811a7017d98fafa7ba84dd8.
2020-09-22rebless after rebaseSimon Vandel Sillesen-8/+0
2020-09-22cleanup cfg after optimizationSimon Vandel Sillesen-8/+6
2020-09-22MIR pass to remove unneeded drops on types not needing dropSimon Vandel Sillesen-0/+150
This is heavily dependent on MIR inlining running to actually see the drop statement
2020-09-22Auto merge of #76810 - Mark-Simulacrum:fix-lld-macos, r=alexcrichtonbors-18/+13
Don't dynamically link LLVM tools unless rustc is too This PR initially tried to support link-shared on all of our target platforms (other than Windows), but ran into a number of difficulties: * LLVM doesn't really support a shared link on macOS (llvm-config runs into problems with the version suffix) * LLVM doesn't seem to support a shared link when cross-compiling (the libLLVM.so ends up empty and symbols are not found) So, this PR has now been revised such that we don't attempt to dynamically link LLVM tools (even if that would, otherwise, be supported) on targets where LLVM is statically linked to rustc. Currently that's basically everything except for x86_64-unknown-linux-gnu (where we dynamically link to avoid rerunning ThinLTO in each stage). Follow-up to #76708. Fixes #76698.
2020-09-22Rebase LLVM onto 11.0.0-rc3Josh Stone-0/+0
2020-09-22Bless compile-failDylan MacKenzie-3/+1
2020-09-22Bless testsDylan MacKenzie-159/+200
2020-09-22fixing the custom.rsblitzerr-1/+1
2020-09-22Auto merge of #76626 - jyn514:x.py-changelog, r=Mark-Simulacrumbors-1/+90
Add a changelog for x.py and nag contributors until they read it Add a changelog for x.py - Add a changelog and instructions for updating it - Use `changelog-seen` in `config.toml` and `VERSION` in bootstrap to determine whether the changelog has been read. There's no way to tie reading the changelog to updating the version, so unfortunately they still have to update `config.toml` manually. Actually reading the changelog is optional, anyone can set `changelog-seen = N` without reading (although it's not recommended). - Nag people if they haven't read the x.py changelog + Print message twice to make sure it's seen - Give different error messages depending on whether the version needs to be updated or added Closes https://github.com/rust-lang/rust/issues/76617 r? `@Mark-Simulacrum`
2020-09-22Auto merge of #76799 - Mark-Simulacrum:fix-cross-compile-dist, r=alexcrichtonbors-16/+90
Fix cross compiling dist/build invocations I am uncertain why the first commit is not affecting CI. I suspect it's because we pass --disable-docs on most of our cross-compilation builders. The second commit doesn't affect CI because CI runs x.py dist, not x.py build. Both commits are standalone; together they should resolve #76733. The first commit doesn't really fix that issue but rather just fixes cross-compiled x.py dist, resolving a bug introduced in #76549.
2020-09-21Rollup merge of #77032 - lcnr:visit-all-the-item-likes, r=davidtwcoecstatic-morse-2/+37
lint missing docs for extern items fixes #76991
2020-09-21Rollup merge of #76914 - lcnr:path-no-more, r=ecstatic-morseecstatic-morse-0/+53
extend `Ty` and `TyCtxt` lints to self types blocked on #76891 r? @ecstatic-morse cc @Aaron1011
2020-09-21Rollup merge of #76807 - ecstatic-morse:const-checking-staged-api, r=oli-obkecstatic-morse-6/+63
Use const-checking to forbid use of unstable features in const-stable functions First step towards #76618. Currently this code isn't ever hit because `qualify_min_const_fn` runs first and catches pretty much everything. One exception is `const_precise_live_drops`, which does not use the newly added code since it runs as part of a separate pass. Also contains some unrelated refactoring, which is split into separate commits. r? @oli-obk
2020-09-21Rollup merge of #76783 - lzutao:rd_impl_kind, r=GuillaumeGomezecstatic-morse-19/+22
Only get ImplKind::Impl once With this, the code panics in one place instead of two.
2020-09-21Rollup merge of #76581 - lcnr:bound-too-generic, r=eddybecstatic-morse-0/+124
do not ICE on bound variables, return `TooGeneric` instead fixes #73260, fixes #74634, fixes #76595 r? @nikomatsakis
2020-09-21Rollup merge of #76489 - GuillaumeGomez:add-explanation-e0756, r=jyn514ecstatic-morse-0/+1
Add explanation for E0756 r? @pickfire
2020-09-21Changing the alloc() to accept &self instead of &mut selfblitzerr-1/+1
2020-09-22lint missing docs for extern itemsBastian Kauschke-2/+37
2020-09-21reviewBastian Kauschke-18/+9
2020-09-21Run the test with explicit -O such that Add is generated instead of CheckedAddSimon Vandel Sillesen-197/+198
This makes the test run deterministic regardless of noopt testruns
2020-09-21Add optimization to avoid load of addressSimon Vandel Sillesen-10/+390
2020-09-21add test for closures in abstract constsBastian Kauschke-0/+21
2020-09-21bless testsBastian Kauschke-10/+20
2020-09-21Test that AtomicU64::from_mut is not available on x86 linux.Mara Bos-0/+16
2020-09-21Record `tcx.def_span` instead of `item.span` in crate metadataAaron Hill-41/+19
This was missed in PR #75465. As a result, a few places have been using the full body span of functions, instead of just the header span.
2020-09-21Add explanation for E0756Guillaume Gomez-0/+1
2020-09-21Add feature gate ui test for cfg(target_has_atomic_equal_alignment).Mara Bos-1/+67
2020-09-21Add feature gate ui test for cfg(target_has_atomic_load_store).Mara Bos-1/+67
2020-09-21add testBastian Kauschke-0/+53