Giter Club home page Giter Club logo

Comments (4)

sigmaSd avatar sigmaSd commented on August 19, 2024

I like the idea!, I implemented it but there are cases when you get an ugly messages like

Are you missing an `;` ?
   Compiling irust v0.1.0 (/tmp/irust)
warning: variable `x` is assigned to, but never used
 --> src/main.rs:2:6
  |
2 |     let x = 5;
  |         ^
  |
  = note: #[warn(unused_variables)] on by default
  = note: consider using `_x` instead

warning: value assigned to `x` is never read
 --> src/main.rs:4:1
  |
4 | x = 6
  | ^
  |
  = note: #[warn(unused_assignments)] on by default
  = help: maybe it is overwritten before being read?

error[E0384]: cannot assign twice to immutable variable `x`
 --> src/main.rs:4:1
  |
2 |     let x = 5;
  |         -
  |         |
  |         first assignment to `x`
  |         help: make this binding mutable: `mut x`
3 |     println!("{:?}", {
4 | x = 6
  | ^^^^^ cannot assign twice to immutable variable

error: aborting due to previous error

For more information about this error, try `rustc --explain E0384`.
error: Could not compile `irust`.

To learn more, run the command again with --verbose.

I think there are steps we need to do before doing this,

1- format output, At first I liked the separation of concerns by making parse() returns a string that is printed by handle_enter(), but now I feel its really limiting, since I'm printing all kind of output the same way, instead of being able to customize per function, for example print "Are you missing an ; ?" with different color, plus I already break that encapsulation with art.rs wait_for_cmd

2- format rustc errors, I want this:

   Compiling irust v0.1.0 (/tmp/irust)
warning: variable `x` is assigned to, but never used
 --> src/main.rs:2:6
  |
2 |     let x = 5;
  |         ^
  |
  = note: #[warn(unused_variables)] on by default
  = note: consider using `_x` instead

to become

 --> src/main.rs:2:6
  |
2 |     let x = 5;
  |         ^
  |

from irust.

sigmaSd avatar sigmaSd commented on August 19, 2024

from irust.

sigmaSd avatar sigmaSd commented on August 19, 2024

@pzmarzly here is a PR for this issue, #9, would be great if you check it out

from irust.

sigmaSd avatar sigmaSd commented on August 19, 2024

should be good now c288e4f

from irust.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.