mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Support c string literals
This commit is contained in:
parent
099b5b3b15
commit
4b577e2bc8
21 changed files with 176 additions and 34 deletions
|
@ -815,7 +815,7 @@ impl<'a> InferenceContext<'a> {
|
|||
Expr::Array(array) => self.infer_expr_array(array, expected),
|
||||
Expr::Literal(lit) => match lit {
|
||||
Literal::Bool(..) => self.result.standard_types.bool_.clone(),
|
||||
Literal::String(..) => {
|
||||
Literal::String(..) | Literal::CString(..) => {
|
||||
TyKind::Ref(Mutability::Not, static_lifetime(), TyKind::Str.intern(Interner))
|
||||
.intern(Interner)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue