diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/dist.rs | 6 | ||||
| -rw-r--r-- | src/etc/gdb_providers.py | 2 | ||||
| -rw-r--r-- | src/etc/lldb_providers.py | 2 | ||||
| -rw-r--r-- | src/test/ui/explain.stdout | 18 |
4 files changed, 20 insertions, 8 deletions
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index 9b77e38a847..354be109cf2 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -1183,7 +1183,11 @@ impl Step for PlainSourceTarball { // characters and on `C:\` paths, so normalize both of them away. pub fn sanitize_sh(path: &Path) -> String { let path = path.to_str().unwrap().replace("\\", "/"); - return change_drive(&path).unwrap_or(path); + return change_drive(unc_to_lfs(&path)).unwrap_or(path); + + fn unc_to_lfs(s: &str) -> &str { + if s.starts_with("//?/") { &s[4..] } else { s } + } fn change_drive(s: &str) -> Option<String> { let mut ch = s.chars(); diff --git a/src/etc/gdb_providers.py b/src/etc/gdb_providers.py index b74d47a8002..cabf5dccbfe 100644 --- a/src/etc/gdb_providers.py +++ b/src/etc/gdb_providers.py @@ -352,7 +352,7 @@ class StdHashMapProvider: ctrl = table["ctrl"]["pointer"] self.size = int(table["items"]) - self.pair_type = table.type.template_argument(0) + self.pair_type = table.type.template_argument(0).strip_typedefs() self.new_layout = not table.type.has_key("data") if self.new_layout: diff --git a/src/etc/lldb_providers.py b/src/etc/lldb_providers.py index 64cb9837943..9c7b07efbaa 100644 --- a/src/etc/lldb_providers.py +++ b/src/etc/lldb_providers.py @@ -531,7 +531,7 @@ class StdHashMapSyntheticProvider: ctrl = table.GetChildMemberWithName("ctrl").GetChildAtIndex(0) self.size = table.GetChildMemberWithName("items").GetValueAsUnsigned() - self.pair_type = table.type.template_args[0] + self.pair_type = table.type.template_args[0].GetTypedefedType() self.pair_type_size = self.pair_type.GetByteSize() self.new_layout = not table.GetChildMemberWithName("data").IsValid() diff --git a/src/test/ui/explain.stdout b/src/test/ui/explain.stdout index c50c46ee564..62f1a7f98ea 100644 --- a/src/test/ui/explain.stdout +++ b/src/test/ui/explain.stdout @@ -1,12 +1,18 @@ Per [RFC 401][rfc401], if you have a function declaration `foo`: ``` +struct S; + // For the purposes of this explanation, all of these // different kinds of `fn` declarations are equivalent: -struct S; + fn foo(x: S) { /* ... */ } -extern "C" { fn foo(x: S); } -impl S { fn foo(self) { /* ... */ } } +extern "C" { + fn foo(x: S); +} +impl S { + fn foo(self) { /* ... */ } +} ``` the type of `foo` is **not** `fn(S)`, as one might expect. @@ -34,8 +40,10 @@ extern "C" fn foo(userdata: Box<i32>) { /* ... */ } -let f: extern "C" fn(*mut i32) = transmute(foo); -callback(f); +unsafe { + let f: extern "C" fn(*mut i32) = transmute(foo); + callback(f); +} ``` Here, transmute is being used to convert the types of the fn arguments. |
