| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
Long-standing branch to remove foreign function wrappers altogether. Calls to C functions are done "in place" with no stack manipulation; the scheme relies entirely on the correct use of `#[fixed_stack_segment]` to guarantee adequate stack space. A linter is added to detect when `#[fixed_stack_segment]` annotations are missing. An `externfn!` macro is added to make it easier to declare foreign fns and wrappers in one go: this macro may need some refinement, though, for example it might be good to be able to declare a group of foreign fns. I leave that for future work (hopefully somebody else's work :) ).
Fixes #3678.
|
|
|
|
|
|
See discussion in #8489, but this selects option 3 by adding a `Default` trait to be implemented by various basic types.
Once this makes it into a snapshot I think it's about time to start overhauling all current use-cases of `fmt!` to move towards `ifmt!`. The goal is to replace `%X` with `{}` in 90% of situations, and this commit should enable that.
|
|
They previously required one called "ext_cx" to be in scope.
Fixes part of #7727
|
|
When using a `do` block to call an internal iterator, if you forgot to
return a value from the body, it would tell you
error: Do-block body must return bool, but returns () here. Perhaps
you meant to write a `for`-loop?
This advice no longer applies as `for` loops are now for external
iterators. Delete this message outright and let it use the default error
message
error: mismatched types: expected `bool` but found `()`
r? @thestinger
|
|
Rename task::yield() to task::deschedule().
Fixes #8494.
|
|
They previously required one called "ext_cx" to be in scope.
Fixes part of #7727
|
|
(This doesn't add/remove `u`s or change `ize` to `ise`, or anything like that.)
|
|
When parsing a trait function, the function must end with either `;` or
`{` (signifying a default implementation). The error message incorrectly
stated that it must be `;` or `}`.
Fixes #6610.
|
|
Pointers to bound variables shouldn't be stored before checking pattern,
otherwise piped patterns can conflict with each other (issue #6338).
Closes #6338.
|
|
This pull request includes support for generic functions and self arguments in methods, and combinations thereof. This also encompasses any kind of trait methods, regular and static, with and without default implementation. The implementation is backed up by a felt ton of test cases `:)`
This is a very important step towards being able to compile larger programs with debug info, since practically any generic function caused an ICE before.
One point worth discussing is that activating debug info now automatically (and silently) sets the `no_monomorphic_collapse` flag. Otherwise debug info would show wrong type names in all but one instance of the monomorphized function.
Another thing to note is that the handling of generic types does not strictly follow the DWARF specification. That is, variables with type `T` (where `T=int`) are described as having type `int` and not as having type `T`. In other words, we are losing information whether a variable has been declared with a type parameter as its type. In practice this should not make much of difference though since the concrete type is mostly what one is interested in. I'll post an issue later so this won't be forgotten.
Also included are a number of bug fixes:
* Closes #1758
* Closes #8513
* Closes #8443
* Fixes handling of field names in tuple structs
* Fixes and re-enables test case for option-like enums that relied on undefined behavior before
* Closes #1339 (should have been closed a while ago)
Cheers,
Michael
|
|
|
|
By using a separate trait this is overridable on a per-type basis and makes room
for the possibility of even more arguments passed in for the future.
|
|
|
|
When using a `do` block to call an internal iterator, if you forgot to
return a value from the body, it would tell you
error: Do-block body must return bool, but returns () here. Perhaps
you meant to write a `for`-loop?
This advice no longer applies as `for` loops are now for external
iterators. Delete this message outright and let it use the default error
message
error: mismatched types: expected `bool` but found `()`
|
|
|
|
* closure-in-generic-function
* generic-functions-nested
* generic-method-on-generic-struct
* generic-trait-generic-static-default-method
* method-on-generic-struct
* self-in-generic-default-method
* trait-generic-static-default-method
Also, fixed an 'unused variable' warning in debuginfo.rs
|
|
|
|
default implementation.
|
|
tuple-structs.
Also new test cases for tuple structs and by-value parameter passing.
|
|
Also, always set no_monomorphic_collapse flags if debuginfo is generated.
|
|
|
|
Conflicts:
src/librustc/lib/llvm.rs
src/librustc/middle/trans/debuginfo.rs
src/rustllvm/RustWrapper.cpp
src/rustllvm/rustllvm.def.in
|
|
behavior.
|
|
Rename task::yield() to task::deschedule().
Fixes #8494.
|
|
This allows the internal implementation details of the TLS keys to be
changed without requiring the update of all the users. (Or, applying
changes that *have* to be applied for the keys to work correctly, e.g.
forcing LLVM to not merge these constants.)
|
|
Implement interior null checking in `.to_c_str()`, among other changes.
|
|
r? @brson
|
|
|
|
This allows the internal implementation details of the TLS keys to be
changed without requiring the update of all the users. (Or, applying
changes that have to be applied for the keys to work correctly, e.g.
forcing LLVM to not merge these constants.)
|
|
|
|
|
|
|
|
These are obsoleted by the generic iterator `zip` adaptor. Unlike
these, it does not clone the elements or allocate a new vector by
default.
|
|
When parsing a trait function, the function must end with either `;` or
`{` (signifying a default implementation). The error message incorrectly
stated that it must be `;` or `}`.
Fixes #6610.
|
|
Closes #3907
Closes #5493
Closes #4464
Closes #4759
Closes #5666
Closes #5884
Closes #5926
Closes #6318
Closes #6557
Closes #6898
Closes #6919
Closes #7222
|
|
Pointers to bound variables shouldn't be stored before checking pattern,
otherwise piped patterns can conflict with each other (issue #6338).
Closes #6338.
|
|
Closes #8248
Closes #8249
Closes #8398
Closes #8401
|
|
|
|
|
|
.with_c_str() is a replacement for the old .as_c_str(), to avoid
unnecessary boilerplate.
Replace all usages of .to_c_str().with_ref() with .with_c_str().
|
|
Fixes #8152.
|
|
|
|
|
|
The type of the result of option_env! was not fully specified in the
None case, leading to type check failures in the case where the variable
was not defined (e.g. option_env!("FOO").is_none()).
Also cleaned up some compilation warnings.
|
|
r? @msullivan ...e parameters
In this case, it's likely to be that the user forgot the `self` type, so
say so.
Closes #4096
|