bors[bot] a888441c47
Merge #2392
2392: Fix panic during the expansion of `column!` r=edwin0cheng a=marcogroppo

Fixes #2379. Well, this isn't the "proper" fix but it doesn't hurt, IMHO.

The problem is that `to_col_number`, called by `column_expand`, receives a position number that isn't included in the text range of the file. My (very limited) understanding is that the text is the one of the original file, while `pos` is relative to something else, probably the text of the macro. Notice that in this case the `column!` expansion seems to be triggered by `assert_eq!`, so we're in the middle of another expansion. This PR simply avoids the panic by checking the length of the text.

r? @edwin0cheng 


Co-authored-by: Marco Groppo <marco.groppo@gmail.com>
2019-11-25 02:42:17 +00:00
..
2019-11-24 08:32:07 +00:00
2019-11-24 12:06:00 +03:00
2019-11-17 18:35:05 +03:00
2019-11-24 20:53:42 +03:00
2019-11-24 14:13:51 +03:00
2019-11-24 21:45:26 +00:00
2019-11-22 10:46:56 +03:00
2019-11-22 01:02:07 +08:00
2019-11-17 18:35:05 +03:00
2019-11-17 18:35:05 +03:00
2019-11-24 15:59:47 +00:00
2019-11-24 08:32:07 +00:00
2019-11-17 18:35:05 +03:00
2019-11-17 18:35:05 +03:00
2019-11-17 18:35:05 +03:00
2019-11-17 18:35:05 +03:00