Commit Graph

101665 Commits

Author SHA1 Message Date
Eduard-Mihai Burtescu
4d81e9dd2f rustc: make DefPathData (and friends) Copy (now that it uses Symbol). 2019-10-25 20:03:17 +03:00
roblabla
13d27aff11 Fix inverted check in EFIAPI 2019-10-25 16:04:21 +00:00
roblabla
61732804e2 Fix EFIABI test
Use revisions to run the EFIABI in multiple configurations, compiling
for each supported UEFI platform, and checking the ABI generated in the
LLVM IR is correct.

Use no_core to make it easier to test.
2019-10-25 16:04:20 +00:00
Mara Bos
381c4425b7 Fix slice::as_ptr_range doctest. 2019-10-25 18:01:31 +02:00
Mazdak Farrokhzad
dfcfca28ad Take out an insurance policy in case iter.size_hint()
lies, underreporting the number of elements.
2019-10-25 17:43:53 +02:00
Jake Goulding
6600cf6040 Add {String,Vec}::into_raw_parts 2019-10-25 11:25:52 -04:00
Jake Goulding
dce8fabc62 Use ManuallyDrop in examples for {Vec,String}::from_raw_parts 2019-10-25 11:22:53 -04:00
Jake Goulding
0d21d257c9 Remove unneeded pointer casting 2019-10-25 11:20:47 -04:00
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
Kevyn Grasso
2337bbb8a4 only relevant parts of type paths highlighted in E0308 type mismatch error message 2019-10-25 10:20:09 -04: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
Guillaume Gomez
863796be7d Improve help popup detection 2019-10-25 13:43:25 +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