| Age | Commit message (Collapse) | Author | Lines |
|
Add support to use functions exported using vectorcall.
This essentially only allows to pass a new LLVM calling convention
from rust to LLVM.
```rust
extern "vectorcall" fn abc(param: c_void);
```
references
----
http://llvm.org/docs/doxygen/html/CallingConv_8h_source.html
https://msdn.microsoft.com/en-us/library/dn375768.aspx
|
|
This adds support for big endian and little endian PowerPC64.
make check runs clean apart from one big endian backtrace issue.
|
|
|
|
This adds support for big endian and little endian PowerPC64.
make check runs clean apart from one big endian backtrace issue.
|
|
|
|
Rust differs in that behavior from C: In C, the newline escapes are resolved
before anything else, and in Rust this depends on whether the backslash is
escaped itself.
A difference can be observed in the following two programs:
```c
#include <stdio.h>
int main()
{
printf("\\
n\n");
return 0;
}
```
```rust
fn main() {
println!("\\
n");
}
```
The first program prints two newlines, the second one prints a backslash, a
newline, the latin character n and a final newline.
|
|
This PR is a rebase of the original PR by @eddyb https://github.com/rust-lang/rust/pull/21836 with some unrebasable parts manually reapplied, feature gate added + type equality restriction added as described below.
This implementation is partial because the type equality restriction is applied to all type ascription expressions and not only those in lvalue contexts. Thus, all difficulties with detection of these contexts and translation of coercions having effect in runtime are avoided.
So, you can't write things with coercions like `let slice = &[1, 2, 3]: &[u8];`. It obviously makes type ascription less useful than it should be, but it's still much more useful than not having type ascription at all.
In particular, things like `let v = something.iter().collect(): Vec<_>;` and `let u = t.into(): U;` work as expected and I'm pretty happy with these improvements alone.
Part of https://github.com/rust-lang/rust/issues/23416
|
|
+ Rebase fixes
|
|
|
|
|
|
Make clear that `super` may be included in the path several times.
r? @steveklabnik
|
|
|
|
|
|
|
|
`unit` was in code formatting, which is wrong, since it's not actual code. The correct code is `()`.
|
|
|
|
|
|
Fixes #29470
|
|
First, re-word the section on if let/while let to be more clear.
Second, actually call them let statements in the statement section
Fixes #29801
|
|
Fixes #29470
|
|
|
|
The struct_variant feature was accepted and is no longer feature gated.
See #19122, #19124
§6.1.6 Enumerations shows an example of a struct-like enum variant.
|
|
Fixes #28824
|
|
Another kind of nominal types in Rust are trait objects, so the following is valid
```rust
trait A {
}
impl A {
}
```
|
|
Shoud have been part of commit 0b13ee0ced39
|
|
r? @steveklabnik
|
|
|
|
Shoud have been part of commit 0b13ee0ced39
|
|
|
|
Having this code section hidden is misleading because it makes it look like implementing Circle for Foo automatically makes Foo implement Shape.
|
|
Having this code section hidden is misleading because it makes it look like implementing Circle for Foo automatically makes Foo implement Shape.
|
|
|
|
|
|
|
|
implement RFC 1238: nonparametric dropck.
cc #28498
cc @nikomatsakis
|
|
|
|
|
|
|
|
Implement cannot-assume-parametricity (CAP) from RFC 1238, and add the
UGEH attribute.
----
Note that we check for the attribute attached to the dtor method, not
the Drop impl.
(This is just to match the specification of RFC and the tests; I am
not wedded to this approach.)
|
|
|
|
|
|
|
|
|
|
Fixes #28706
|
|
|
|
|
|
|
|
This adds a new target property, `target_vendor`. It is to be be used as a matcher for conditional compilation. The vendor is part of the [autoconf target triple](http://llvm.org/docs/doxygen/html/classllvm_1_1Triple.html#details): `<arch><sub>-<vendor>-<os>-<env>`. `arch`, `target_os` and `target_env` are already supported by Rust.
This change was suggested in PR #28593. It enables conditional compilation based on the vendor. This is needed for the rumprun target, which needs to match against both, target_os and target_vendor.
The default value for `target_vendor` is "unknown", "apple" and "pc" are other common values.
Matching against the `target_vendor` is introduced behind the feature gate `#![feature(cfg_target_vendor)]`.
This is the first time I messed around with rustc internals. I just added the my code where I found the existing `target_*` variables, hopefully I haven't missed anything. Please review with care. :)
r? @alexcrichton
|
|
|
|
|