- 30 8月, 2021 1 次提交
-
-
由 patrick-gu 提交于
-
- 29 8月, 2021 1 次提交
-
-
由 bors 提交于
build llvm libunwind.a in rustbuild This PR move the building of llvm-libunwind from build script of libunwind to rustbuild, so user don't need a C compiler and recompile this C/C++ library when using build-std, and user can use codegen flags `link-self-contained` and cargo flag `build-std-features` to control the behavior of libunwind linking.
-
- 28 8月, 2021 16 次提交
-
-
由 bors 提交于
Add missing const edge case We don't "process" const so we need to check for additional cases when the PatKind is a Path. We need to make sure that if there is only one variant that there is no field. If there is one or more field, we will want to borrow the match scrutinee Closes https://github.com/rust-lang/rust/issues/88331 r? `@nikomatsakis`
-
由 bors 提交于
Revert "Disable the machine outliner by default" The fix commit is already in the fork: https://github.com/rust-lang/llvm-project/commit/6c78dbd4ca1f Linked: - https://github.com/rust-lang/rust/issues/85351 - https://github.com/rust-lang/rust/pull/86020
-
由 bors 提交于
Treat macros as HIR items Macros have historically been treated differently from other items at the HIR level. This PR makes them just like normal items. There are a few special cases left over, which I've attempted to lay out below. By normalizing the treatment of macro items, this PR simplifies a fair bit of code and fixes some bugs at the same time. For more information, see #87406. r? `@cjgillot` ## Backwards incompatibility This is backwards incompatible in one small way. Due to a mistake, it was previously possible to apply stability attributes to an exported macro, even without enabling the `staged_api` feature. This never should have worked. After this PR, it will error, as it should. We could make it a warning instead, but that would require a special case for a feature that shouldn't ever have worked and is likely used by no or very few crates, so I'm not thrilled about the idea. ## Notes for reviewers ### Commit seperation I'd recommend reviewing this PR commit by commit. The commit chunking wasn't perfect, but it's better than looking at the combined diff, which is quite overwhelming. The compiler and standard library build after each commit, although tests do not necessarily pass and tools do not necessarily build till the end of the series. ### Special cases There are a few special cases that remain after this change. Here are the notable ones I remember: 1. Visibility works a bit differently for `macro_rules!` macros than other items, since they aren't generally marked with `pub` but instead with `#[macro_export]`. 2. Since `#[macro_export]` macros always have paths at the top level of the crate, some additional handling needs to be done on the reexport to top level. ### Performance impact I don't know for sure, but theses changes may slightly hurt performance. They create more work for the compiler in a few places. For instance, some operations that were previously run only for exported macros are now run for all macros. A perf run is probably advisable. For all I know we'll see performance improvements instead. :) ## Issues resolved This resolves #87406 (the tracking issue for this change). It also fixes several bugs: Fixes #59306. Fixes #73754. Fixes #87257.
-
由 bors 提交于
S390x inline asm This adds register definitions and constraint codes for the s390x general and floating point registers necessary for fixing #85931; as well as a few tests. Further testing is needed, but I am a little unsure of what specific tests should be added to `src/test/assembly/asm/s390x.rs` to address this.
-
由 inquisitivecrystal 提交于
-
由 inquisitivecrystal 提交于
-
由 inquisitivecrystal 提交于
-
由 inquisitivecrystal 提交于
-
由 liudingming 提交于
-
由 12101111 提交于
-
由 12101111 提交于
-
由 bors 提交于
Introduce `~const` - [x] Removed `?const` and change uses of `?const` - [x] Added `~const` to the AST. It is gated behind const_trait_impl. - [x] Validate `~const` in ast_validation. - [x] Update UI Tests - [x] Add enum `BoundConstness` (With variants `NotConst` and `ConstIfConst` allowing future extensions) - [x] Adjust trait selection and pre-existing code to use `BoundConstness`. - [ ] Optional steps for this PR - [x] Fix #88155 - [x] ~~Do something with constness bounds in chalk~~ Must be done to rust-lang/chalk (just tried to refactor, there are a lot of errors to resolve :( ) - [ ] Adjust Error messages for `~const` bounds that can't be satisfied. r? `@oli-obk`
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
-
由 bors 提交于
Tracking issue for `UNSUPPORTED_CALLING_CONVENTIONS` This was previously forgotten. Nominating for 1.55 as this lint will make it into stable in that release. r? `@Mark-Simulacrum`
-
由 Simonas Kazlauskas 提交于
-
- 27 8月, 2021 22 次提交
-
-
由 Roxane 提交于
-
由 Roxane 提交于
-
由 Deadbeef 提交于
-
由 Deadbeef 提交于
-
由 bors 提交于
Adjust linking order of static nobundle libraries Link the static libraries with "-bundle" modifier from upstream rust crate right after linking this rust crate. Some linker such as GNU linker `ld.bdf` treat order of linking as order of dependency. After this change, static libraries with "-bundle" modifier is linked in the same order as "+bundle" modifier. So we can change the value of "bundle" modifier without causing linking error. fix: https://github.com/rust-lang/rust/issues/87541 r? `@petrochenkov`
-
由 Deadbeef 提交于
-
由 Deadbeef 提交于
-
由 Deadbeef 提交于
-
由 bors 提交于
`#[inline]` non-generic `pub fn`s in `rustc_target::abi` and `ty::layout`. Mostly doing this as a perf curiosity, having spotted that `#[inline]` usage is a bit spotty.
-
由 Deadbeef 提交于
-
由 Deadbeef 提交于
-
由 Deadbeef 提交于
-
由 Deadbeef 提交于
-
由 Deadbeef 提交于
- [x] Removed `?const` and change uses of `?const` - [x] Added `~const` to the AST. It is gated behind const_trait_impl. - [x] Validate `~const` in ast_validation. - [ ] Add enum `BoundConstness` to the HIR. (With variants `NotConst` and `ConstIfConst` allowing future extensions) - [ ] Adjust trait selection and pre-existing code to use `BoundConstness`. - [ ] Optional steps (*for this PR, obviously*) - [ ] Fix #88155 - [ ] Do something with constness bounds in chalk
-
由 bors 提交于
Update cargo 19 commits in e96bdb0c3d0a418e7fcd7fbd69be08abf830b4bc..f559c109cc79fe413a8535fb620a5a58b3823d94 2021-08-17 22:58:47 +0000 to 2021-08-26 22:54:55 +0000 - Fix test not to rely on `cargo` in PATH. (rust-lang/cargo#9843) - Improve resolver message to include dependency requirements (rust-lang/cargo#9827) - Add hint for cargo metadata in environment section (rust-lang/cargo#9836) - Fix panic with build-std of a proc-macro. (rust-lang/cargo#9834) - Fix typos “a”→“an” (rust-lang/cargo#9821) - Fix typo in git-authentication.md (rust-lang/cargo#9832) - Add some debug logging for `cargo fix` (rust-lang/cargo#9831) - Add documentation about third-party registries. (rust-lang/cargo#9830) - unset the FIX_ENV when executing the real rustc (rust-lang/cargo#9818) - Allow crate download by checksum (rust-lang/cargo#9801) - Emit warning for migrating to unstable edition in stable channel (rust-lang/cargo#9792) - Warning for no lib dependencies (rust-lang/cargo#9771) - Temporarily disable extern-html-root-url test. (rust-lang/cargo#9824) - Move `tmp` test directory. (rust-lang/cargo#9814) - Fix test incorrectly validating CARGO_PKG_LICENSE_FILE. (rust-lang/cargo#9813) - Implement `[future-incompat-report]` config section (rust-lang/cargo#9774) - Bump curl. (rust-lang/cargo#9809) - Determine packages to install prior to installing (rust-lang/cargo#9793) - Show feature resolver differences for dev-dependencies. (rust-lang/cargo#9803)
-
由 Eric Huss 提交于
-
由 bors 提交于
Rollup of 11 pull requests Successful merges: - #87832 (Fix debugger stepping behavior with `match` expressions) - #88123 (Make spans for tuple patterns in E0023 more precise) - #88215 (Reland #83738: "rustdoc: Don't load all extern crates unconditionally") - #88216 (Don't stabilize creation of TryReserveError instances) - #88270 (Handle type ascription type ops in NLL HRTB diagnostics) - #88289 (Fixes for LLVM change 0f45c16f2caa7c035e5c3edd40af9e0d51ad6ba7) - #88320 (type_implements_trait consider obligation failure on overflow) - #88332 (Add argument types tait tests) - #88340 (Add `c_size_t` and `c_ssize_t` to `std::os::raw`.) - #88346 (Revert "Add type of a let tait test impl trait straight in let") - #88348 (Add field types tait tests) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 bors 提交于
lazily "compute" anon const default substs Continuing the work of #83086, this implements the discussed solution for the [unused substs problem](https://github.com/rust-lang/project-const-generics/blob/master/design-docs/anon-const-substs.md#unused-substs). As of now, anonymous constants inherit all of their parents generics, even if they do not use them, e.g. in `fn foo<T, const N: usize>() -> [T; N + 1]`, the array length has `T` as a generic parameter even though it doesn't use it. These *unused substs* cause some backwards incompatible, and imo incorrect behavior, e.g. #78369. --- We do not actually filter any generic parameters here and the `default_anon_const_substs` query still a dummy which only checks that - we now prevent the previously existing query cycles and are able to call `predicates_of(parent)` when computing the substs of anonymous constants - the default anon consts substs only include the typeflags we assume it does. Implementing that filtering will be left as future work. --- The idea of this PR is to delay the creation of the anon const substs until after we've computed `predicates_of` for the parent of the anon const. As the predicates of the parent can however contain the anon const we still have to create a `ty::Const` for it. We do this by changing the substs field of `ty::Unevaluated` to an option and modifying accesses to instead call the method `unevaluated.substs(tcx)` which returns the substs as before. If the substs - now `substs_` - of `ty::Unevaluated` are `None`, it means that the anon const currently has its default substs, i.e. the substs it has when first constructed, which are the generic parameters it has available. To be able to call `unevaluated.substs(tcx)` in a `TypeVisitor`, we add the non-defaulted method `fn tcx_for_anon_const_substs(&self) -> Option<TyCtxt<'tcx>>`. In case `tcx_for_anon_const_substs` returns `None`, unknown anon const default substs are skipped entirely. Even when `substs_` is `None` we still have to treat the constant as if it has its default substs. To do this, `TypeFlags` are modified so that it is clear whether they can still change when *exposing* any anon const default substs. A new flag, `HAS_UNKNOWN_DEFAULT_CONST_SUBSTS`, is added in case some default flags are missing. The rest of this PR are some smaller changes to either not cause cycles by trying to access the default anon const substs too early or to be able to access the `tcx` in previously unused locations. cc `@rust-lang/project-const-generics` r? `@nikomatsakis`
-
由 Manish Goregaokar 提交于
Add field types tait tests r? ```@oli-obk``` Related to #86727
-
由 Manish Goregaokar 提交于
Revert "Add type of a let tait test impl trait straight in let" This reverts commit dbadab54. This is not part of TAITs, so, if tested should probably be done elsewhere. r? ````@oli-obk```` This is similar to what I was commenting here https://github.com/rust-lang/rust/pull/88332#discussion_r695939901 These is not part of TAITs so should not live in type-alias-impl-trait test directory. I'm going to avoid adding this kind of tests in `type-alias-impl-trait` test directory and avoid thinking about them in this pass.
-
由 Manish Goregaokar 提交于
Add `c_size_t` and `c_ssize_t` to `std::os::raw`. Apparently these aren't guaranteed to be the same, and are merely "always the same in practice" (see https://rust-lang.zulipchat.com/#narrow/stream/136281-t-lang.2Fwg-unsafe-code-guidelines/topic/.60usize.60.20vs.20.60size_t.60). This is a big footgun, but I suspect it can be alleviated if we expose this and start migrating people to it in advance of any platforms that ever have this as different. I'll file a tracking issue after this gets some traction.
-
由 Manish Goregaokar 提交于
Add argument types tait tests r? ``@oli-obk`` Related to #86727
-