- 18 1月, 2018 4 次提交
-
-
由 kennytm 提交于
Standardize on "re-export" rather than "reexport" While working on the book with our editors, it was brought to our attention that we're not consistent with when we use "re-export" versus "reexport". For the book, we've decided (with our editors) to go with "re-export"; in prose, I think that looks better. In code, I'm fine with "reexport". However, the rustdoc generated section is currently "Reexports", so when we have a screenshot of generated documentation with the prose where we use "re-export", it's inconsistent. It's too late to fix this for the book because we're using 1.21.0 for the output in the book, and it's really only one spot so it's not a huge deal, but I'd like to advocate for changing the documentation header so that a future edition of the book can be consistent. The first commit here only changes the documentation section heading text and rustdoc documentation that references it. This is the commit that's most important to me. The second commit changes error messages and associated tests to also be consistent with the use of re-export. This is the next most important commit to me, but I could be argued out of this one because then it won't match code like the `macro_reexports` feature name, which ostensibly should change to `macro_re_exports` to be most consistent but I didn't want to change code. The last commit changes re-export anywhere else in prose: either in documentation comments or regular comments. This is least important as most of them aren't user-visible. Instances like these will likely sneak back in over time. I'm totally fine dropping this commit if anyone wants, but [the hobgoblins made me do it](http://www.bartleby.com/100/420.47.html) and it sets a good example. r? @steveklabnik
-
由 kennytm 提交于
Report errors instead of panic!() when linkcheck encounters absolute paths The RBE contained some absolute links that failed the link check in #46196. Diagnosing these issues was needlessly complicated, thanks to the linkchecker just panicing instead of reporting proper errors. This PR replaces the panic with a proper `*errors = true` + error message handling. The linkchecker itself doesn't have any tests so I intentionally didn't touch anything else than the code that previously did the `panic!()`. A small code quality improvement might be made by binding the `Path::new(base).join(url)` into a variable before the for-loop and using this resolved url in both the for loop and the error message. r? @steveklabnik (If not for any other reason than having r on the #46196.)
-
由 kennytm 提交于
Optimize slice.{r}position result bounds check Second attempt of https://github.com/rust-lang/rust/pull/45501 Fixes https://github.com/rust-lang/rust/issues/45964 Demo: https://godbolt.org/g/N4mBHp
-
由 kennytm 提交于
fix faulty comment after #43506 there is no fixed number of request sent.
-
- 17 1月, 2018 1 次提交
-
-
由 bors 提交于
Remove dep-info files as targets in themselves If you ask `rustc` to `--emit dep-info`, the resulting dependency file contains a rule for producing the dependency file itself. This differs from the output of `gcc -MD` or `clang -MD`, which only includes dependency rules for the object files produced. Tools like Ninja often consume and delete dependency files as soon as they’re produced for performance reasons, particularly on Windows. In the case of `rustc` output, though, the recently-deleted dependency file is cached by Ninja as a target, and therefore triggers a rebuild every time. This very small patch removes the dep-info file from the list of output filenames, so it matches the behavior of gcc and clang.
-
- 16 1月, 2018 6 次提交
-
-
由 bors 提交于
rustc_trans: reorganize CrateContext and rename context types. Firstly, the `{Shared,Local}CrateContext` hasn't been meaningful for a while now, and this PR resolves it by moving all their fields to `CrateContext` and removing redundant accessor methods. Secondly, this PR contains the following mass-renames: * `ccx: CrateContext` -> `cx: CodegenCx` * `mircx: MirContext` -> `fx: FunctionCx` * `bcx: Builder` -> `bx: Builder` r? @nikomatsakis
-
由 Adam C. Foltzer 提交于
This avoids a breaking change to dep-info output, putting the gcc/clang-compliant dep-info behavior behind a flag
-
由 Adam C. Foltzer 提交于
-
-
-
-
- 15 1月, 2018 18 次提交
-
-
由 bors 提交于
Add error code for unstable feature errors Fixes #47397.
-
由 bors 提交于
Rollup of 10 pull requests - Successful merges: #47120, #47126, #47277, #47330, #47368, #47372, #47414, #47417, #47432, #47443 - Failed merges: #47334
-
由 kennytm 提交于
Make ui-fulldeps/update-references executable When a ui-fulldeps comparison fails it suggests running update-references.sh: ``` src/test/ui-fulldeps/update-references.sh 'rust/build/x86_64-apple-darwin/test/ui-fulldeps' 'resolve-error.rs' ``` This does not work as update-references.sh isn't executable. The other update-references.sh in the ui directory is already executable so this looks like an oversight.
-
由 kennytm 提交于
Move "no asm" check into AST validation
-
由 kennytm 提交于
Enforce dashes in the unstable book file names Also rename the existing underscore using files to use dashes. Fixes #47394.
-
由 kennytm 提交于
Avoid panicking when invalid argument is passed to cfg(..) Closes #43925. Closes #43926.
-
由 kennytm 提交于
Add NLL tests for #46557 and #38899 This adapts the sample code from the two issues into test code. Closes #46557 Closes #38899 r? @nikomatsakis
-
由 kennytm 提交于
fix off-by-one error Fixes https://github.com/rust-lang/rust/issues/47325.
-
由 kennytm 提交于
doc: show that `f32::log` and `f64::log` are not correctly rounded Fixes #47273. One thing I'm not sure about is whether the "calculated as `self.ln() / base.ln()`" bit is being too specific, maybe we do not want to make this such a strong commitment. I think it's fine, but we should not make commitments in the API documentation by accident. In case that is removed, the added sentence "`self.log2()` can ... base 10." still makes it amply clear that the `log` methods can be more inaccurate than other methods. If the above clause is removed, this second sentence can be moved to the first paragraph, kind of like the accuracy comment for the [`mul_add`](https://doc.rust-lang.org/std/primitive.f32.html#method.mul_add) method.
-
由 kennytm 提交于
Add slice::ExactChunks and ::ExactChunksMut iterators These guarantee that always the requested slice size will be returned and any leftoever elements at the end will be ignored. It allows llvm to get rid of bounds checks in the code using the iterator. This is inspired by the same iterators provided by ndarray. Fixes https://github.com/rust-lang/rust/issues/47115 I'll add unit tests for all this if the general idea and behaviour makes sense for everybody. Also see https://github.com/rust-lang/rust/issues/47115#issuecomment-354715511 for an example what this improves.
-
由 kennytm 提交于
Better Debug impl for io::Error. This PR includes the below changes: 1. The former impl wrapped the entire thing in `Error { repr: ... }` which was unhelpful; this has been removed. 2. The `Os` variant of `io::Error` included the code and message, but not the kind; this has been fixed. 3. The `Custom` variant of `io::Error` included a `Custom(Custom { ... })`, which is now just `Custom { ... }`. Example of previous impl: ```rust Error { repr: Custom( Custom { kind: InvalidData, error: Error { repr: Os { code: 2, message: "no such file or directory" } } } ) } ``` Example of new impl: ```rust Custom { kind: InvalidData, error: Os { code: 2, kind: NotFound, message: "no such file or directory" } } ```
-
由 Guillaume Gomez 提交于
-
由 bors 提交于
NLL: bad error message when converting anonymous lifetime to `'static` Fixes #46983. r? @nikomatsakis
-
由 Fenrir 提交于
-
由 bors 提交于
Adding RBE as a submodule #46194 Adding RBE as a submodule to start issue #46194.
-
由 Ryan Cumming 提交于
When a ui-fulldeps comparison fails it suggests running update-references.sh: ``` src/test/ui-fulldeps/update-references.sh 'rust/build/x86_64-apple-darwin/test/ui-fulldeps' 'resolve-error.rs' ``` This does not work as update-references.sh isn't executable. The other update-references.sh in the ui directory is already executable so this looks like an oversight.
-
由 bors 提交于
syntax: Rewrite parsing of impls Properly parse impls for the never type `!` Recover from missing `for` in `impl Trait for Type` Prohibit inherent default impls and default impls of auto traits (https://github.com/rust-lang/rust/issues/37653#issuecomment-348687794, https://github.com/rust-lang/rust/issues/37653#issuecomment-348688785) Change wording in more diagnostics to use "auto traits" Fix some spans in diagnostics Some other minor code cleanups in the parser Disambiguate generics and qualified paths in impls (parse `impl <Type as Trait>::AssocTy { ... }`) Replace the future-compatibility hack from https://github.com/rust-lang/rust/pull/38268 with actually parsing generic parameters Add a test for https://github.com/rust-lang/rust/issues/46438
-
- 14 1月, 2018 11 次提交
-
-
由 Vadim Petrochenkov 提交于
-
由 Vadim Petrochenkov 提交于
Properly parse impls for the never type `!` Recover from missing `for` in `impl Trait for Type` Prohibit inherent default impls and default impls of auto traits Change wording in more diagnostics to use "auto traits" Some minor code cleanups in the parser
-
由 bors 提交于
resolve type and region variables in "NLL dropck" Fixes #47022. r? @pnkfelix
-
由 bors 提交于
Use correct line offsets for doctests Not yet tested. This doesn't handle char positions. It could if I collected a map of char offsets and lines, but this is a bit more work and requires hooking into the parser much more (unsure if it's possible). r? @QuietMisdreavus (fixes #45868)
-
由 bors 提交于
Implement libstd for CloudABI. Though CloudABI is strongly inspired by POSIX, its absence of features that don't work well with capability-based sandboxing makes it different enough that adding bits to `sys/unix` will make things a mess. This change therefore adds CloudABI specific platform code under `sys/cloudabi`. One of the goals of this implementation is to build as much as possible directly on top of CloudABI's system call layer, as opposed to using the C library. This is preferred, as the system call layer is supposed to be stable, whereas the C library ABI technically is not. An advantage of this approach is that it allows us to implement certain interfaces, such as mutexes and condition variables more optimally. They can be lighter than the ones provided by pthreads. This change disables some modules that cannot realistically be implemented right now. For example, libstd's pathname abstraction is not designed with POSIX `*at()` (e.g., `openat()`) in mind. The `*at()` functions are the only set of file system APIs available on CloudABI. There is no global file system namespace, nor a process working directory. Discussions on how to port these modules over are outside the scope of this change.
-
由 Eduard-Mihai Burtescu 提交于
-
由 Eduard-Mihai Burtescu 提交于
-
由 Eduard-Mihai Burtescu 提交于
-
由 Eduard-Mihai Burtescu 提交于
-
由 Eduard-Mihai Burtescu 提交于
-
由 Eduard-Mihai Burtescu 提交于
-