This repository was archived by the owner on May 28, 2025. It is now read-only.
  
  
  
  
    
    
    
      
    
  
  
    
File tree Expand file tree Collapse file tree 4 files changed +22
-6
lines changed 
compiler/rustc_driver_impl Expand file tree Collapse file tree 4 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -79,9 +79,23 @@ See [the rustc-dev-guide for more info][sysllvm].
7979   ./configure
8080   ``` 
8181
82-    If you plan to use ` x.py install `  to create an installation, it is
83-    recommended that you set the ` prefix `  value in the ` [install] `  section to a
84-    directory: ` ./configure --set install.prefix=<path> ` 
82+    If you plan to use ` x.py install `  to create an installation, you can either
83+    set ` DESTDIR `  environment variable to your custom directory path:
84+ 
85+    ``` bash 
86+    export  DESTDIR=< path> 
87+    ``` 
88+ 
89+    or set ` prefix `  and ` sysconfdir `  in the ` [install] `  section to your custom
90+    directory path:
91+ 
92+    ``` sh 
93+    ./configure --set install.prefix=< path>  --set install.sysconfdir=< path> 
94+    ``` 
95+ 
96+    When the ` DESTDIR `  environment variable is present, the ` prefix `  and
97+    ` sysconfdir `  values are combined with the path from the ` DESTDIR ` 
98+    environment variable.
8599
861003 .  Build and install:
87101
Original file line number Diff line number Diff line change @@ -7,4 +7,4 @@ options).
77
88For more information about how the driver works, see the [ rustc dev guide] .
99
10- [ rustc dev guide ] : https://rustc-dev-guide.rust-lang.org/rustc-driver.html 
10+ [ rustc dev guide ] : https://rustc-dev-guide.rust-lang.org/rustc-driver/intro .html 
Original file line number Diff line number Diff line change 213213//!  - All other locals need to be declared with `let` somewhere and then can be accessed by name. 
214214//! 
215215//! #### Places 
216- //!  - Locals implicit  convert to places. 
216+ //!  - Locals implicitly  convert to places. 
217217//!  - Field accesses, derefs, and indexing work normally. 
218218//!  - Fields in variants can be accessed via the [`Variant`] and [`Field`] associated functions, 
219219//!    see their documentation for details. 
Original file line number Diff line number Diff line change @@ -117,13 +117,15 @@ impl Thread {
117117    pub  fn  set_name ( name :  & CStr )  { 
118118        const  PR_SET_NAME :  libc:: c_int  = 15 ; 
119119        unsafe  { 
120-             libc:: prctl ( 
120+             let  res =  libc:: prctl ( 
121121                PR_SET_NAME , 
122122                name. as_ptr ( ) , 
123123                0  as  libc:: c_ulong , 
124124                0  as  libc:: c_ulong , 
125125                0  as  libc:: c_ulong , 
126126            ) ; 
127+             // We have no good way of propagating errors here, but in debug-builds let's check that this actually worked. 
128+             debug_assert_eq ! ( res,  0 ) ; 
127129        } 
128130    } 
129131
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments