These are chat archives for rust-lang/rust

13th
Mar 2019
John
@onFireForGod_gitlab
Mar 13 07:04 UTC
what is a good ide for rust
vscode broke on me
atom has stupid auto fill-ins that keep putting random text with I put { or ( and intellJ is extremly slow, I write 3 seconds later I see the change
toxicafunk
@toxicafunk
Mar 13 07:06 UTC
i've heard good things about this: https://tabnine.com/
but its on my TODO list to try
let us know ur experience if u try it plz
John
@onFireForGod_gitlab
Mar 13 07:38 UTC
does anyone know how to enable linter in IDEA rust plugin?
Zakarum
@omni-viral
Mar 13 08:01 UTC
I use vscode, what is wrong with it?
John
@onFireForGod_gitlab
Mar 13 08:02 UTC
it does not lint
it broke recently on me
I reinstalled it still does not work
okay started to work, just now
vscode
toxicafunk
@toxicafunk
Mar 13 08:06 UTC
M$
John
@onFireForGod_gitlab
Mar 13 08:07 UTC
atom has a pretty cool plugin, it allows to pin the doc on the side
but the autocomplete thing drives me nuts
Michal 'vorner' Vaner
@vorner
Mar 13 09:10 UTC
I use nvim with rls (and bunch of other plugins). That makes it quite a decent IDE.
Greg Wiley
@aztecrex
Mar 13 13:58 UTC
Are Rust source files defined to be stored in a particular text encoding? Is that documented somewhere I can use for reference annotation? I have not been able to find a specification for that.
If so, I presume it's UTF-8
Ingvar Stepanyan
@RReverser
Mar 13 13:59 UTC
Hmm I don't think so, but normally UTF-8 is the standard
Greg Wiley
@aztecrex
Mar 13 14:00 UTC
Thanks. I wonder if rustc does any detection
Ingvar Stepanyan
@RReverser
Mar 13 14:00 UTC
Actually yes, it does require UTF-8
(which probably makes sense given that it's what all string APIs in Rust require)
Greg Wiley
@aztecrex
Mar 13 14:00 UTC
That's what I would have assumed. Do you have a reference document link?
Ingvar Stepanyan
@RReverser
Mar 13 14:06 UTC
Not really, the easiest is probably to look in libsyntax code, which seems to just operate on Rust strings (which, as we know, are UTF-8) https://github.com/rust-lang/rust/blob/master/src/libsyntax/parse/lexer/mod.rs
Greg Wiley
@aztecrex
Mar 13 15:43 UTC
thanks
Denis Lisov
@tanriol
Mar 13 15:45 UTC
Well, actually it is documented in the reference
Ingvar Stepanyan
@RReverser
Mar 13 15:46 UTC
Ah, good point :)
Ash
@ashthespy
Mar 13 15:59 UTC
@onFireForGod_gitlab have you tried the using the tree-sitter based language rust with Atom? It does quite a decent job IMO..
Greg Wiley
@aztecrex
Mar 13 17:34 UTC
Thanks @tanriol - just what I was looking for. I know it's not an official spec but it will do for my purposes
Brian Knapp
@knappador
Mar 13 20:37 UTC
Besides the type system and borrow checking, what are some ways to enforce usages in Rust to catch things at compile time rather than runtime?
Zakarum
@omni-viral
Mar 13 20:45 UTC
Whatever you implement via those two
thojest
@thojest
Mar 13 23:46 UTC
hi guys i need your help
in my test i want to create some custom struct from a string
i want to check if this works so idea is create string "foo"
then Address::from_str("foo")
convert back and assert: assert_eq!("foo", Address::from_str("foo").to_string()[..])
thojest
@thojest
Mar 13 23:51 UTC
problem: Address implements fmt of Display
and uses some fance formating
*fancy
is there a way to assert against the raw string?