-
Notifications
You must be signed in to change notification settings - Fork 38
Master update 28 05 2020 #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…akis Use `T`'s discriminant type in `mem::Discriminant<T>` instead of `u64`. fixes rust-lang#70509 Adds the lang-item `discriminant_kind`. Updates the function signature of `intrinsics::discriminant_value`. Adds the *probably permanently unstable* trait `DiscriminantKind`. `mem::Discriminant` should now be smaller in some cases. r? @ghost
Dumb NRVO This is a very simple version of an NRVO pass, which scans backwards from the `return` terminator to see if there is an an assignment like `_0 = _1`. If a basic block with two or more predecessors is encountered during this scan without first seeing an assignment to the return place, we bail out. This avoids running a full "reaching definitions" dataflow analysis. I wanted to see how much `rustc` would benefit from even a very limited version of this optimization. We should be able to use this as a point of comparison for more advanced versions that are based on live ranges. r? @ghost
…ts, r=Amanieu Make `std::char` functions and constants associated to `char`. First step to fix rust-lang#71763.
rustc-book: Document `-Z strip=val` option cc rust-lang#72110
…h-search-behaviour, r=kinnison Fix going back in history to a search result page on firefox This bug was actually firefox not re-running JS script when you go back in history. To trigger it on the current docs: * Make a search * Pick an element (which isn't on the same page as the current element!) * Go back in history Instead of having the search results, you'll see the normal doc page. You can find a small explanation about it [here](http://web.archive.org/web/20100428053932/http://www.firefoxanswer.com/firefox/672-firefoxanswer.html). r? @kinnison cc @ollie27
…ochenkov Suggest installing VS Build Tools in more situations When MSVC's `link.exe` wasn't found but another `link.exe` was, the error message given can be [impenetrable](https://pastebin.com/MRMCr7HM) to many users. The usual suspect is GNU's `link` tool. In this case, inform the user that they may need to install VS build tools. This only applies when Microsoft's link tool is expected.
…r=ecstatic-morse Remove unused `StableHashingContext::node_to_hir_id` method cc rust-lang#50928
…eklabnik FIX - Char documentation for unexperienced users This is my first PR on rust and even if I've read [CONTRIBUTING.md](https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#pull-requests) I'm ensure everything is perfect. Sorry if I didn't follow the exact procedure. **What it does:** - Add an example in the char documentation **Explanation** Unexperienced users might not know that punctuation is `Case_Ignorable` and not `Uppercase` and `Lowercase` which mean that when checking if a string is uppercase one might be tempted to write: ```rust my_string.chars().all(char::is_uppercase) ``` However this will return false for `"HELLO WORLD"` which is not intuitive. Since the function `is_case_ignorable` doesn't exists I believe the correct way to check is: ```rust !my_string.chars().any(char::is_lowercase) ``` The aim of this example is to prevent unexperienced users to make an error which punctuation chars.
llvm: Expose tiny code model to users This model is relevant to embedded AArch64 targets and was added to LLVM relatively recently (https://reviews.llvm.org/D49673, mid 2018), so rustc frontend didn't provide access to it with `-C code-model`. The gcc analogue is [`-mcmodel=tiny`](https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html). (This is one of the options that are passed directly to LLVM without being interpreted by rustc.) Follow up to rust-lang#72248.
Rollup of 7 pull requests Successful merges: - rust-lang#71854 (Make `std::char` functions and constants associated to `char`.) - rust-lang#72111 (rustc-book: Document `-Z strip=val` option) - rust-lang#72272 (Fix going back in history to a search result page on firefox) - rust-lang#72296 (Suggest installing VS Build Tools in more situations) - rust-lang#72365 (Remove unused `StableHashingContext::node_to_hir_id` method) - rust-lang#72371 (FIX - Char documentation for unexperienced users) - rust-lang#72397 (llvm: Expose tiny code model to users) Failed merges: r? @ghost
Experimentally add `ffi_const` and `ffi_pure` extern fn attributes Add FFI function attributes corresponding to clang/gcc/... `const` and `pure`. Rebased version of rust-lang#58327 by @gnzlbg with the following changes: - Switched back from the `c_ffi_const` and `c_ffi_pure` naming to `ffi_const` and `ffi_pure`, as I agree with rust-lang#58327 (comment) and this nicely aligns with `ffi_returns_twice` - (Hopefully) took care of all of @hanna-kruppe's change requests in the original PR r? @hanna-kruppe
…tead of `NodeId`
This is to provide a more explicit statement against a code pattern that many people end up coming with, since the reason of it being unsound comes from the badly known single-allocation validity rule. Providing that very pattern as a counter-example could help mitigate that. Co-authored-by: Ralf Jung <post@ralfj.de>
…, r=varkor De-abuse TyKind::Error in exhaustiveness checking Replaces rust-lang#71074. Context: rust-lang#70866. In order to remove the use of `TyKind::Error`, I had to make sure we skip over those fields whose inhabitedness should not be observed. This is potentially error-prone however, since we must be careful not to mix filtered and unfiltered lists of patterns. I managed to hide away most of the filtering behind a new `Fields` struct, that I used everywhere relevant. I quite like the result; I think the twin concepts of `Constructor` and `Fields` make a good mental model. As usual, I tried to separate commits that shuffle code around from commits that require more thought to review. cc @varkor @Centril
Intern predicates Implements the first step of rust-lang/compiler-team#285 Renames `ty::Predicate` to `ty::PredicateKind`, which is now interned. To ease the transition, `ty::Predicate` is now a struct containing a reference to `ty::PredicateKind`. r? @ghost
Don't `type_of` on trait assoc ty without default Fix rust-lang#72076.
Update transitive dependencies to remove some deps Similar to rust-lang#71919, this removes some (duplicate) dependencies.
perf: Revert accidental inclusion of a part of rust-lang#69218 This was accidentally included in rust-lang#69464 after a rebase and given how much `inflate` and `keccak` stresses the obligation forest seems like a likely culprit to the regression in those benchmarks. (It is necessary in rust-lang#69218 as obligation forest needs to accurately track the root variables or unifications will get lost)
Pass more `Copy` types by value. There are a lot of locations where we pass `&T where T: Copy` by reference, which should both be slightly less performant and less readable IMO. This PR currently consists of three fairly self contained commits: - passes `ty::Predicate` by value and stops depending on `AsRef<ty::Predicate>`. - changes `<&List<_>>::into_iter` to iterate over the elements by value. This would break `List`s of non copy types. But as the only list constructor requires `T` to be copy anyways, I think the improved readability is worth this potential future restriction. - passes `mir::PlaceElem` by value. Mir currently has quite a few copy types which are passed by reference, e.g. `Local`. As I don't have a lot of experience working with MIR, I mostly did this to get some feedback from people who use MIR more frequently - tries to reuse `ty::Predicate` in case it did not change in some places, which should hopefully fix the regression caused by rust-lang#72055 r? @nikomatsakis for the first commit, which continues the work of rust-lang#72055 and makes adding `PredicateKind::ForAll` slightly more pleasant. Feel free to reassign though
This branch (or xtensa-target since the merge) fails to compile for me with these errors:
I was compiling successfully before. Thanks for your efforts! |
I cant seem to reproduce your issue, perhaps a fresh clone and build? |
I just tried again, still the same error. Tried multiple times deleting the whole project directory, tried building it in a clean chroot with just the base dependencies installed. I always get the same exact error. To double-check I just checked out again commit 25ae59a and recompiled it and it's working correctly without even cleaning the build directory. I am not sure what to try next. I guess I could try bisecting the repo to find the first commit with the issue but I am not sure that every commit is supposed to build correctly and there are a lot... |
I'm experiencing the same problem. I can confirm that the build was succeeding yesterday, but upon a fresh clone of the repo today this error has emerged. Edit: I can confirm that checking out 25ae59a and building works correctly. |
It works for me. However need to update llvm manually to later version to support all needed asm commands.
|
I can also confirm that I cannot compile a freshly cloned xtensa-target branch (exactly the same output as the OP). |
I'm still struggling to reproduce this issue, I've done multiple clean builds with the following steps:
All of which of compiled successfully on my system. Could you provide some more info on your build environment? |
Works for me too:
|
Alright, I got what we are doing differently. I am trying to package the project for Arch Linux with a custom PKGBUILD (basically, it's just a bash script). This doesn't really matter because the errors can be reproduced without running the packaging script. The steps I was using are a little different, but I tried with many variations. Initially, I was using a separately packaged llvm build (with The thing is that This used to work. Maybe that's also what @matevarga and @jessebraham are trying to do. |
Thanks - correct, build works fine, install doesn't. |
I think @mtorromeo is on the right path. I'm going from memory here but I am fairly confident it was I'm building a $ git clone https://github.com/MabezDev/rust-xtensa.git
$ cd ./rust-xtensa
$ ./configure --experimental-targets="Xtensa" --prefix="$RUST_BUILD"
$ python x.py build
$ python x.py install I realize I did say 'build' in my previous post so apologies for not being more clear about that. |
Ah okay, thanks for the clarification, I should be able to reproduce now. |
I think I've found it. mdbook-linkcheck bumped the codespan version, which meant there were two different versions. Could you try #35? |
I have checked out f87a95f and successfully built and installed, so that seems to have done the trick. Thanks! |
I confirm it's working fine now. Thanks! |
Glad to hear it :). When you have it packaged up, would you mind PR'ing a link to it in the readme? I'm sure arch users would appreciate it! |
Sure thing! I am still ironing out a few things. Note that there's already a package on AUR [1] but I am working on a cleaner implementation. I know that by nature of this project it's maybe not an easy thing to do but it would be cool to have some tagged commits for stable/semi-stable builds so that I can prepare a package that follows those "releases". |
That might be quite difficult, but I could try and loosely follow the rust update cycle (every 6 weeks)? If that works for you I could try and do that for the next Rust release? |
The idea is a new release should represent a suggested version to use because you either think that it should work better than any other random commit and/or that the user should really update from an older commit because there are important changes in the new version. 6 weeks update cycles should be fine but I think the fixed release windows are something that is more useful to the developers to organize the work into releases and plan features ahead of time. You can use whatever timeline you are comfortable with IMO. If you think that pulling changes at every push you make to the default branch has the same stability "guarantees" than the releases you would tag, then I don't think you should make your life any harder by worrying about the releases. I'll leave it up to you, whatever you can do is really appreciated anyway! |
No description provided.