Created
          April 14, 2014 01:51 
        
      - 
      
- 
        Save shadowmint/10610400 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | enum PyrsErr { | |
| InternalErr | |
| } | |
| ... | |
| pub fn init() -> Result<*mut Struct_ppyData, PyrsErr> { | |
| unsafe { | |
| return Ok(ppy_init()); | |
| } | |
| return Err(InternalErr); // <-- Works fine | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | enum PyrsErr { | |
| InternalErr | |
| } | |
| ... | |
| pub fn init() -> Result<*mut Struct_ppyData, PyrsErr> { | |
| unsafe { | |
| return Ok(ppy_init()); | |
| } | |
| Err(InternalErr); // <--- See error below | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | pyrs.rs:28:3: 28:19 error: cannot determine a type for this expression: unconstrained type | |
| pyrs.rs:28 Err(InternalErr); | |
| ^~~~~~~~~~~~~~~~ | |
| error: aborting due to previous error | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment