Commit Graph

101436 Commits

Author SHA1 Message Date
Pietro Albini
9c44ca231a
ci: fix tidy 2019-10-25 16:51:12 +02:00
Pietro Albini
fe65c8ef4c
ci: set MSYS_BITS environment variable for all windows builders
A few dist builders lacked that variable, causing build failures.
2019-10-25 16:47:41 +02:00
Pietro Albini
19fdc5c07f
ci: fix installation condition for MinGW
I mistakenly inverted the "variable is not set" check in bash.
2019-10-25 16:47:41 +02:00
Pietro Albini
db0078706b
ci: split install-msys2 step into two separate scripts 2019-10-25 16:47:41 +02:00
Pietro Albini
9d15336149
ci: fix wrong path being set in install-msys2.sh 2019-10-25 16:08:43 +02:00
Pietro Albini
d52db03ef0
ci: fix innosetup installation 2019-10-25 16:08:42 +02:00
Pietro Albini
10fa917a13
ci: reuse the mirrors base url from shared.sh in scripts 2019-10-25 16:08:41 +02:00
Pietro Albini
7855ee2aa8
ci: fix tidy 2019-10-25 16:08:39 +02:00
Pietro Albini
4bc4fae073
ci: cleanup platform detection 2019-10-25 16:08:37 +02:00
Pietro Albini
102dc3ddc1
ci: use shared.sh in scripts/install-awscli.sh 2019-10-25 16:08:36 +02:00
Pietro Albini
9c252f14bc
ci: extract verifying line endings into a script 2019-10-25 16:08:35 +02:00
Pietro Albini
9a9d427ef9
ci: extract checking out submodules into a script 2019-10-25 16:08:33 +02:00
Pietro Albini
d264e954dc
ci: extract enabling ipv6 on docker into a script 2019-10-25 16:08:32 +02:00
Pietro Albini
bc9a0dc1b3
ci: extract installing ninja into a script 2019-10-25 16:08:31 +02:00
Pietro Albini
e55059a5e6
ci: extract installing mingw into a script 2019-10-25 16:08:29 +02:00
Pietro Albini
852dfd7a17
ci: extract installing msys2 into a script 2019-10-25 16:08:27 +02:00
Raoul Strackx
5aafa98562 forgot pushfq/popqfq: fixed 2019-10-25 16:06:13 +02:00
Pietro Albini
e0b1b3bbc1
ci: extract disabling git crlf handling into a script 2019-10-25 16:03:11 +02:00
Pietro Albini
6dd074a8f6
ci: extract parts of windows-build-deps into scripts 2019-10-25 16:03:10 +02:00
Pietro Albini
1c0d764049
ci: extract switching xcode into a script 2019-10-25 16:03:08 +02:00
Pietro Albini
c5bbde3e2f
ci: extract installing clang into a script 2019-10-25 16:03:07 +02:00
Pietro Albini
a36077235e
ci: extract installing sccache into a script 2019-10-25 16:03:06 +02:00
Pietro Albini
c1fb42add5
ci: extract dumping the environment into a script 2019-10-25 16:03:04 +02:00
Pietro Albini
4f568f8a81
ci: move install-awscli.sh into scripts/ 2019-10-25 16:03:03 +02:00
Mara Bos
de9b660a40 Explain why pointer::add in slice::as_ptr_range is safe. 2019-10-25 15:46:42 +02:00
Raoul Strackx
34f5d5923f cleaning up code 2019-10-25 15:44:07 +02:00
Raoul Strackx
d257c20a1d removed unnecessary push 2019-10-25 15:27:48 +02:00
roblabla
093ec70b1e Add new EFIAPI ABI
Adds a new ABI for the EFIAPI calls. This ABI should reflect the latest
version of the UEFI specification at the time of commit (UEFI spec 2.8,
URL below). The specification says that for x86_64, we should follow the
win64 ABI, while on all other supported platforms (ia32, itanium, arm,
arm64 and risc-v), we should follow the C ABI.

To simplify the implementation, we will simply follow the C ABI on all
platforms except x86_64, even those technically unsupported by the UEFI
specification.

https://uefi.org/sites/default/files/resources/UEFI_Spec_2_8_final.pdf
2019-10-25 13:01:25 +00:00
Felix S. Klock II
f645e90992 Update test output.
(My inference is that the number changed from 4 to 5 because `derive(PartialEq)` now injects an extra trait impl before.)
2019-10-25 14:52:39 +02:00
Felix S. Klock II
86f7d6f21e Review feedback: elaborated comments. 2019-10-25 14:52:38 +02:00
Felix S. Klock II
98f5b11b6b Migrate from #[structural_match] attribute a lang-item trait.
(Or more precisely, a pair of such traits: one for `derive(PartialEq)` and one
for `derive(Eq)`.)

((The addition of the second marker trait, `StructuralEq`, is largely a hack to
work-around `fn (&T)` not implementing `PartialEq` and `Eq`; see also issue
rust-lang/rust#46989; otherwise I would just check if `Eq` is implemented.))

Note: this does not use trait fulfillment error-reporting machinery; it just
uses the trait system to determine if the ADT was tagged or not. (Nonetheless, I
have kept an `on_unimplemented` message on the new trait for structural_match
check, even though it is currently not used.)

Note also: this does *not* resolve the ICE from rust-lang/rust#65466, as noted
in a comment added in this commit. Further work is necessary to resolve that and
other problems with the structural match checking, especially to do so without
breaking stable code (adapted from test fn-ptr-is-structurally-matchable.rs):

```rust
fn r_sm_to(_: &SM) {}

fn main() {
    const CFN6: Wrap<fn(&SM)> = Wrap(r_sm_to);
    let input: Wrap<fn(&SM)> = Wrap(r_sm_to);
    match Wrap(input) {
        Wrap(CFN6) => {}
        Wrap(_) => {}
    };
}
```

where we would hit a problem with the strategy of unconditionally checking for
`PartialEq` because the type `for <'a> fn(&'a SM)` does not currently even
*implement* `PartialEq`.

----

added review feedback:
* use an or-pattern
* eschew `return` when tail position will do.
* don't need fresh_expansion; just add `structural_match` to appropriate `allow_internal_unstable` attributes.

also fixed example in doc comment so that it actually compiles.
2019-10-25 14:52:07 +02:00
Mara Bos
f1b69b0a87 Add slice_ptr_range tracking issue number. 2019-10-25 14:33:07 +02:00
Mara Bos
4936f96d42 Add [T]::as_ptr_range() and [T]::as_mut_ptr_range().
See https://github.com/rust-lang/rfcs/pull/2791 for motivation.
2019-10-25 14:09:32 +02:00
bors
23f890f102 Auto merge of #65804 - Centril:rollup-arlxgch, r=Centril
Rollup of 9 pull requests

Successful merges:

 - #64639 (Stabilize `#[non_exhaustive]` (RFC 2008))
 - #65074 (Fix the start/end byte positions in the compiler JSON output)
 - #65315 (Intern place projection)
 - #65685 (Fix check of `statx` and handle EPERM)
 - #65731 (Prevent unnecessary allocation in PathBuf::set_extension.)
 - #65740 (Fix default "disable-shortcuts" feature value)
 - #65787 (move panictry! to where it is used.)
 - #65789 (move Attribute::with_desugared_doc to librustdoc)
 - #65790 (move report_invalid_macro_expansion_item to item.rs)

Failed merges:

r? @ghost
2019-10-25 11:13:30 +00:00
Mazdak Farrokhzad
c0bbb4bcdc
Rollup merge of #65790 - Centril:move-report-invalid, r=davidtwco
move report_invalid_macro_expansion_item to item.rs

From https://github.com/rust-lang/rust/pull/65324.

r? @Mark-Simulacrum
2019-10-25 13:12:55 +02:00
Mazdak Farrokhzad
cbcbba24ac
Rollup merge of #65789 - Centril:with-desugared-doc, r=davidtwco
move Attribute::with_desugared_doc to librustdoc

From https://github.com/rust-lang/rust/pull/65324.

r? @varkor
2019-10-25 13:12:54 +02:00
Mazdak Farrokhzad
0bfe483c5c
Rollup merge of #65787 - Centril:panictry, r=davidtwco
move panictry! to where it is used.

From https://github.com/rust-lang/rust/pull/65324

r? @davidtwco
2019-10-25 13:12:53 +02:00
Mazdak Farrokhzad
07b5c2a46e
Rollup merge of #65740 - GuillaumeGomez:fix-disable-shortcut-feature, r=Dylan-DPC
Fix default "disable-shortcuts" feature value

Follow-up of https://github.com/rust-lang/rust/pull/65656

It fixes the bad handling of the default value of the feature (which would disable shortcut by default, which is bad!).

r? @Dylan-DPC
cc @kinnison
2019-10-25 13:12:51 +02:00
Mazdak Farrokhzad
3e3f21cd0a
Rollup merge of #65731 - fusion-engineering-forks:set-extension, r=dtolnay
Prevent unnecessary allocation in PathBuf::set_extension.

It was allocating a new `OsString` that was immediately dropped after using it with `set_file_name`. Now it directly changes the extension in the original buffer, without touching the rest of the file name or allocating a temporary string.
2019-10-25 13:12:50 +02:00
Mazdak Farrokhzad
f1d747a99d
Rollup merge of #65685 - oxalica:statx-eperm, r=alexcrichton
Fix check of `statx` and handle EPERM

Should fix #65662

https://github.com/rust-lang/rust/issues/65662#issuecomment-544593939
> I think a reasonable solution might be to do something like try to stat AT_CWD initially and if that fails with EPERM or ENOSYS we disable the syscall entirely, otherwise it's cached as always good to use.

r? @alexcrichton
2019-10-25 13:12:48 +02:00
Mazdak Farrokhzad
8bb039fb83
Rollup merge of #65315 - spastorino:intern-place-projection, r=oli-obk
Intern place projection

This should sit on top of https://github.com/rust-lang/rust/pull/65197. After that one merged, I'm gonna rebase on top of it.

The important commits are the last three and there's a bunch of code repetition that I'm going to remove but for that I need to refactor some things that probably need to be added before this PR.

Anyway this work helps as is because we can run perf tests :).

r? @oli-obk /cc @nikomatsakis
2019-10-25 13:12:46 +02:00
Mazdak Farrokhzad
1f93be1bb3
Rollup merge of #65074 - Rantanen:json-byte-pos, r=matklad
Fix the start/end byte positions in the compiler JSON output

Track the changes made during normalization in the `SourceFile` and use this information to correct the `start_byte` and `end_byte` fields in the JSON output.

This should ensure the start/end byte fields can be used to index the original file, even if Rust normalized the source code for parsing purposes. Both CRLF to LF and BOM removal are handled with this one.

The rough plan was discussed with @matklad in rust-lang-nursery/rustfix#176 - although I ended up going with `u32` offset tracking so I wouldn't need to deal with `u32 + i32` arithmetics when applying the offset to the span byte positions.

Fixes #65029
2019-10-25 13:12:45 +02:00
Mazdak Farrokhzad
959b6e324c
Rollup merge of #64639 - davidtwco:rfc-2008-stabilization, r=Centril
Stabilize `#[non_exhaustive]` (RFC 2008)

Fixes #44109.

This pull request stabilizes the `#[non_exhaustive]` attribute, which is used to indicate that a type will have more fields / variants added in the future. It can be applied to `struct`s, `enum`s and `enum` variants. See https://github.com/rust-lang/rust/issues/44109#issuecomment-533356866 for the stabilization report.

r? @Centril
2019-10-25 13:12:43 +02:00
Felix S. Klock II
620083ad16 refactoring: move const_to_pat code into its own submodule. 2019-10-25 11:39:12 +02:00
Lukas Kalbertodt
dcf3436899 Fill tracking issue number for array_value_iter and fix Rust version 2019-10-25 11:37:30 +02:00
Felix S. Klock II
4f7b922afe refactor: move structural_match analysis into its own module. 2019-10-25 11:27:36 +02:00
Michael Woerister
9c083068e3 self-profiling: Switch query-blocking measurements to RAII-style API. 2019-10-25 11:14:29 +02:00
Felix S. Klock II
f0e370f067 fix typo in filename. 2019-10-25 11:08:07 +02:00
Felix S. Klock II
c2b4c433a5 fix typo in test. 2019-10-25 11:07:59 +02:00
Mazdak Farrokhzad
9e3e3a470e
with_desugared_doc: correctly refer to attr instead of self
Co-Authored-By: David Wood <Q0KPU0H1YOEPHRY1R2SN5B5RL@david.davidtw.co>
2019-10-25 10:43:08 +02:00