- 09 7月, 2017 1 次提交
-
-
由 Guillaume Gomez 提交于
-
- 08 7月, 2017 21 次提交
-
-
由 bors 提交于
Implement O(1)-time Iterator::nth for Range*, and slim the Step trait Fixes #43064. Fixes part of #39975. Fixes items 1 <s>and 3</s> of #42168. CC #27741. I think #42310 and #43012 should not have landed without the `nth` part of this PR, but oh well.
-
由 Simon Sapin 提交于
-
由 Simon Sapin 提交于
-
由 Simon Sapin 提交于
-
由 Simon Sapin 提交于
-
由 Simon Sapin 提交于
-
由 Simon Sapin 提交于
-
由 Simon Sapin 提交于
-
由 bors 提交于
Skip the main thread's manual stack guard on Linux Linux doesn't allocate the whole stack right away, and the kernel has its own stack-guard mechanism to fault when growing too close to an existing mapping. If we map our own guard, then the kernel starts enforcing a rather large gap above that, rendering much of the possible stack space useless. Instead, we'll just note where we expect rlimit to start faulting, so our handler can report "stack overflow", and trust that the kernel's own stack guard will work. Fixes #43052. r? @alexcrichton ### Kernel compatibility: Strictly speaking, Rust claims support for Linux kernels >= 2.6.18, and stack guards were only added to mainline in 2.6.36 for [CVE-2010-2240]. But since that vulnerability was so severe, the guards were backported to many stable branches, and Red Hat patched this all the way back to RHEL3's 2.4.21! I think it's reasonable for us to assume that any *supportable* kernel should have these stack guards. At that time, the kernel only enforced one page of padding between the stack and other mappings, but thanks to [Stack Clash] that padding is now much larger, causing #43052. The kernel side of those fixes are in [CVE-2017-1000364], which Red Hat has backported to at least RHEL5's 2.6.18 so far. [CVE-2010-2240]: https://access.redhat.com/security/cve/CVE-2010-2240 [CVE-2017-1000364]: https://access.redhat.com/security/cve/CVE-2017-1000364 [Stack Clash]: https://access.redhat.com/security/vulnerabilities/stackguard
-
由 bors 提交于
Make sufficiently old or low-impact compatibility lints deny-by-default Needs crater run before proceeding. r? @nikomatsakis
-
由 Vadim Petrochenkov 提交于
Fix some tests on Linux
-
由 Vadim Petrochenkov 提交于
This is going to be a hard error while all private-in-public errors from rustc_privacy will be reclassified into lints.
-
由 Vadim Petrochenkov 提交于
-
由 Vadim Petrochenkov 提交于
-
由 bors 提交于
Replace the global fulfillment cache with the evaluation cache This uses the new "Chalk" ParamEnv refactoring to check "global" predicates in an empty environment, which should be correct because global predicates aren't affected by a consistent environment. Fixes #39970. Fixes #42796. r? @nikomatsakis
-
由 bors 提交于
remove associated_consts feature gate Currently struggling to run tests locally (something about jemalloc target missing). cc #29646
-
由 Ariel Ben-Yehuda 提交于
This helps avoid cache pollution. Also add more comments explaining that.
-
由 Ariel Ben-Yehuda 提交于
The evaluation cache already exists, and it can handle differing parameter environments natively. Fixes #39970. Fixes #42796.
-
由 Ariel Ben-Yehuda 提交于
This is just duplicating the logic from the old fulfillment cache, so I'm not sure it is 100% correct, but it should not be more wrong than the old logic.
-
由 Ariel Ben-Yehuda 提交于
Previously, coinductive matching was only blocked on the fulfillment path, and ignored on the evaluation path.
-
由 Josh Stone 提交于
Linux doesn't allocate the whole stack right away, and the kernel has its own stack-guard mechanism to fault when growing too close to an existing mapping. If we map our own guard, then the kernel starts enforcing a rather large gap above that, rendering much of the possible stack space useless. Instead, we'll just note where we expect rlimit to start faulting, so our handler can report "stack overflow", and trust that the kernel's own stack guard will work. Fixes #43052.
-
- 07 7月, 2017 18 次提交
-
-
由 bors 提交于
add a built-in MSP430 target the MSP430 backend has been enabled for a while but no target was added to rustc to encourage out of tree experimentation. We believe the out of tree (custom) target has been iterated long enough and is stable enough for inclusion in the compiler. Kudos to @pftbest and @awygle for fixing several LLVM / codegen bugs this target had! The target name chosen is a slight variation of the triple gcc uses, which is simply `msp430-elf`. We picked `msp430-none-elf` to leave room for custom targets that target some embedded OS running on MSP430 devices. (cf. the custom `thumbv7m-tockos-eabi` target TockOS uses vs the built-in `thumbv7m-none-eabi`). There's one expected change in the specification of the proposed target: the `asm_args` and `no_integrated_as` fields will change to their default values. Once the LLVM backend gains the ability to directly produce MSP430 object files we can stop depending on `msp430-elf-gcc` for producing object files; when that occurs the `asm` related fields will change. This change won't break existing user code. r? @alexcrichton cc @brson
-
由 bors 提交于
Add annotations to the resize fn #39791 This adds the `inline(never)` and `cold` annotations to the HashMap::resize function.
-
由 bors 提交于
syntax: Apply `x as usize < y` recovery to type ascription as well Also correct spans, add some comments. r? @estebank
-
由 Vadim Petrochenkov 提交于
Fix spans, add some comments
-
由 Vadim Petrochenkov 提交于
-
由 bors 提交于
Privileged in docker run isn't necessary Added relatively recently in https://github.com/rust-lang/rust/pull/40199/files#diff-71609a365528e4649836825d8250c241R57, but I don't see anything in that PR that requires it. If it's not strictly necessary, we shouldn't use it. (if this lands I'll make a PR against libc which also uses privileged) r? @alexcrichton
-
由 bors 提交于
rustdoc: Don't run Markdown tests twice This matches the behaviour for finding tests in Rust files. This was a regression from 1.17 to 1.18 so it would be a good idea to backport this to beta so at least 1.19 won't also be affected. Fixes #42726 r? @GuillaumeGomez
-
由 bors 提交于
Implement TcpStream::connect_timeout This breaks the "single syscall rule", but it's really annoying to hand write and is pretty foundational. r? @alexcrichton cc @rust-lang/libs
-
由 Steven Fackler 提交于
This breaks the "single syscall rule", but it's really annoying to hand write and is pretty foundational.
-
由 bors 提交于
Check types for privacy This PR implements late post factum checking of type privacy, as opposed to early preventive "private-in-public" checking. This will allow to turn private-in-public checks into a lint and make them more heuristic-based, and more aligned with what people may expect (e.g. reachability-based behavior). Types are privacy-checked if they are written explicitly, and also if they are inferred as expression or pattern types. This PR checks "semantic" types and does it unhygienically, this significantly restricts what macros 2.0 (as implemented in https://github.com/rust-lang/rust/pull/40847) can do (sorry @jseyfried) - they still can use private *names*, but can't use private *types*. This is the most conservative solution, but hopefully it's temporary and can be relaxed in the future, probably using macro contexts of expression/pattern spans. Traits are also checked in preparation for [trait aliases](https://github.com/rust-lang/rust/issues/41517), which will be able to leak private traits, and macros 2.0 which will be able to leak pretty much anything. This is a [breaking-change], but the code that is not contrived and can be broken by this patch should be guarded by `private_in_public` lint. [Previous crater run](https://github.com/rust-lang/rust/issues/34537#issuecomment-262865768) discovered a few abandoned crates that weren't updated since `private_in_public` has been introduced in 2015. cc https://github.com/rust-lang/rust/issues/34537 https://internals.rust-lang.org/t/lang-team-minutes-private-in-public-rules/4504 Fixes https://github.com/rust-lang/rust/issues/30476 Fixes https://github.com/rust-lang/rust/issues/33479 cc @nikomatsakis r? @EddyB
-
由 petrochenkov 提交于
Fix regressions after rebase
-
由 bors 提交于
Make suggestion include the line number When there're more than one suggestions in the same diagnostic, they are displayed in their own block, instead of inline. In order to reduce confusion, those blocks now display the line number. New output: ``` error[E0308]: mismatched types --> ../../src/test/ui/block-result/unexpected-return-on-unit.rs:19:5 | 19 | foo() | ^^^^^ expected (), found usize | = note: expected type `()` found type `usize` help: did you mean to add a semicolon here? | 19 | foo(); | ^ help: possibly return type missing here? | 18 | fn bar() -> usize { | ^^^^^^^^ error: aborting due to previous error(s) ``` Fix #39152.
-
由 Aidan Hobson Sayers 提交于
-
由 Jorge Aparicio 提交于
-
由 Esteban Küber 提交于
-
由 Esteban Küber 提交于
-
由 Esteban Küber 提交于
When there're more than one suggestions in the same diagnostic, they are displayed in their own block, instead of inline. In order to reduce confusion, those blocks now display the line number.
-
由 Vadim Petrochenkov 提交于
Cleanup checking of inherent static methods and fix checking of inherent associated constants Add more tests
-