File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ error_chain! {
190
190
}
191
191
InvalidToolchainPath ( p: PathBuf ) {
192
192
description( "invalid toolchain path" ) ,
193
- display( "invalid toolchain path: '{}'" , p. display ( ) )
193
+ display( "invalid toolchain path: '{}'" , p. to_string_lossy ( ) )
194
194
}
195
195
CannotSpecifyPathAndOptions ( path: PathBuf ) {
196
196
description( "toolchain options are ignored for path toolchains" ) ,
Original file line number Diff line number Diff line change @@ -1470,7 +1470,10 @@ fn file_override_path() {
1470
1470
let toolchain_file = config. current_dir ( ) . join ( "rust-toolchain.toml" ) ;
1471
1471
raw:: write_file (
1472
1472
& toolchain_file,
1473
- & format ! ( "[toolchain]\n path=\" {}\" " , toolchain_path. to_str( ) . unwrap( ) ) ,
1473
+ & dbg ! ( format!(
1474
+ "[toolchain]\n path=\" {}\" " ,
1475
+ toolchain_path. to_str( ) . unwrap( )
1476
+ ) ) ,
1474
1477
)
1475
1478
. unwrap ( ) ;
1476
1479
@@ -1545,7 +1548,7 @@ fn file_override_path_relative() {
1545
1548
// Find shared prefix so we can determine a relative path
1546
1549
let mut p1 = dbg ! ( & toolchain_path) . components ( ) . peekable ( ) ;
1547
1550
let mut p2 = dbg ! ( & toolchain_file) . components ( ) . peekable ( ) ;
1548
- while let ( Some ( p1p) , Some ( p2p) ) = ( p1. peek ( ) , p2. peek ( ) ) {
1551
+ while let ( Some ( p1p) , Some ( p2p) ) = ( dbg ! ( p1. peek( ) ) , dbg ! ( p2. peek( ) ) ) {
1549
1552
if p1p == p2p {
1550
1553
let _ = p1. next ( ) ;
1551
1554
let _ = p2. next ( ) ;
@@ -1556,13 +1559,14 @@ fn file_override_path_relative() {
1556
1559
}
1557
1560
let mut relative_path = PathBuf :: new ( ) ;
1558
1561
// NOTE: We skip 1 since we don't need to .. across the .toml file at the end of the path
1559
- for _ in p2. skip ( 1 ) {
1562
+ for p in p2. skip ( 1 ) {
1563
+ dbg ! ( p) ;
1560
1564
relative_path. push ( ".." ) ;
1561
1565
}
1562
1566
for p in p1 {
1563
- relative_path. push ( p ) ;
1567
+ relative_path. push ( dbg ! ( p ) ) ;
1564
1568
}
1565
- assert ! ( relative_path. is_relative( ) ) ;
1569
+ assert ! ( dbg! ( & relative_path) . is_relative( ) ) ;
1566
1570
1567
1571
raw:: write_file (
1568
1572
& toolchain_file,
You can’t perform that action at this time.
0 commit comments