{"action":"closed","number":220,"pull_request":{"url":"https://api.github.com/repos/trishume/syntect/pulls/220","id":223578562,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIzNTc4NTYy","html_url":"https://github.com/trishume/syntect/pull/220","diff_url":"https://github.com/trishume/syntect/pull/220.diff","patch_url":"https://github.com/trishume/syntect/pull/220.patch","issue_url":"https://api.github.com/repos/trishume/syntect/issues/220","number":220,"state":"closed","locked":false,"title":"correctly apply multiple with_prototypes when a context is set","user":{"login":"keith-hall","id":11882719,"node_id":"MDQ6VXNlcjExODgyNzE5","avatar_url":"https://avatars0.githubusercontent.com/u/11882719?v=4","gravatar_id":"","url":"https://api.github.com/users/keith-hall","html_url":"https://github.com/keith-hall","followers_url":"https://api.github.com/users/keith-hall/followers","following_url":"https://api.github.com/users/keith-hall/following{/other_user}","gists_url":"https://api.github.com/users/keith-hall/gists{/gist_id}","starred_url":"https://api.github.com/users/keith-hall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keith-hall/subscriptions","organizations_url":"https://api.github.com/users/keith-hall/orgs","repos_url":"https://api.github.com/users/keith-hall/repos","events_url":"https://api.github.com/users/keith-hall/events{/privacy}","received_events_url":"https://api.github.com/users/keith-hall/received_events","type":"User","site_admin":false},"body":"fixes https://github.com/trishume/syntect/issues/178 and fixes https://github.com/trishume/syntect/issues/160 and also the ASP syntax test failures.\r\n\r\nHowever, due to my limited Rust knowledge, in it's current state, this PR also breaks something - any help anyone can give me here would be highly appreciated! I temporarily removed `lvl.captures.as_ref()` from line 312 of `parser.rs` (replaced it with `None`) as I was getting a compiler error which I don't know how to fix properly:\r\n\r\n```\r\nerror[E0597]: `lvl` does not live long enough\r\n   --> src\\parsing\\parser.rs:312:126\r\n    |\r\n312 |             let with_prototypes = self.stack[proto_start..].iter().flat_map(|lvl| lvl.prototype.iter().map(|ctx| (true, ctx, lvl.captures.as_ref())));\r\n    |                                                                                                            -----             ^^^                   - borrowed value only lives until here\r\n    |                                                                                                            |                 |\r\n    |                                                                                                            |                 borrowed value does not live long enough\r\n    |                                                                                                            capture occurs here\r\n...\r\n369 |     }\r\n    |     - borrowed value needs to live until here\r\n```\r\n\r\nDoes anyone know what I need to do to satisfy the borrow checker please?\r\n","created_at":"2018-10-17T12:13:03Z","updated_at":"2018-10-30T01:33:21Z","closed_at":"2018-10-30T01:33:21Z","merged_at":"2018-10-30T01:33:20Z","merge_commit_sha":"a09ad08c0eda3de805ed54bbe308aa9c0f221ba8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/trishume/syntect/pulls/220/commits","review_comments_url":"https://api.github.com/repos/trishume/syntect/pulls/220/comments","review_comment_url":"https://api.github.com/repos/trishume/syntect/pulls/comments{/number}","comments_url":"https://api.github.com/repos/trishume/syntect/issues/220/comments","statuses_url":"https://api.github.com/repos/trishume/syntect/statuses/fedcd89495d1a35edf5573b0b60bbceaf854915f","head":{"label":"forkeith:fix_set_with_prototype","ref":"fix_set_with_prototype","sha":"fedcd89495d1a35edf5573b0b60bbceaf854915f","user":{"login":"forkeith","id":18188872,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4MTg4ODcy","avatar_url":"https://avatars2.githubusercontent.com/u/18188872?v=4","gravatar_id":"","url":"https://api.github.com/users/forkeith","html_url":"https://github.com/forkeith","followers_url":"https://api.github.com/users/forkeith/followers","following_url":"https://api.github.com/users/forkeith/following{/other_user}","gists_url":"https://api.github.com/users/forkeith/gists{/gist_id}","starred_url":"https://api.github.com/users/forkeith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forkeith/subscriptions","organizations_url":"https://api.github.com/users/forkeith/orgs","repos_url":"https://api.github.com/users/forkeith/repos","events_url":"https://api.github.com/users/forkeith/events{/privacy}","received_events_url":"https://api.github.com/users/forkeith/received_events","type":"Organization","site_admin":false},"repo":{"id":84288171,"node_id":"MDEwOlJlcG9zaXRvcnk4NDI4ODE3MQ==","name":"syntect","full_name":"forkeith/syntect","private":false,"owner":{"login":"forkeith","id":18188872,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4MTg4ODcy","avatar_url":"https://avatars2.githubusercontent.com/u/18188872?v=4","gravatar_id":"","url":"https://api.github.com/users/forkeith","html_url":"https://github.com/forkeith","followers_url":"https://api.github.com/users/forkeith/followers","following_url":"https://api.github.com/users/forkeith/following{/other_user}","gists_url":"https://api.github.com/users/forkeith/gists{/gist_id}","starred_url":"https://api.github.com/users/forkeith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forkeith/subscriptions","organizations_url":"https://api.github.com/users/forkeith/orgs","repos_url":"https://api.github.com/users/forkeith/repos","events_url":"https://api.github.com/users/forkeith/events{/privacy}","received_events_url":"https://api.github.com/users/forkeith/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/forkeith/syntect","description":"Rust library for syntax highlighting using Sublime Text syntax definitions.","fork":true,"url":"https://api.github.com/repos/forkeith/syntect","forks_url":"https://api.github.com/repos/forkeith/syntect/forks","keys_url":"https://api.github.com/repos/forkeith/syntect/keys{/key_id}","collaborators_url":"https://api.github.com/repos/forkeith/syntect/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/forkeith/syntect/teams","hooks_url":"https://api.github.com/repos/forkeith/syntect/hooks","issue_events_url":"https://api.github.com/repos/forkeith/syntect/issues/events{/number}","events_url":"https://api.github.com/repos/forkeith/syntect/events","assignees_url":"https://api.github.com/repos/forkeith/syntect/assignees{/user}","branches_url":"https://api.github.com/repos/forkeith/syntect/branches{/branch}","tags_url":"https://api.github.com/repos/forkeith/syntect/tags","blobs_url":"https://api.github.com/repos/forkeith/syntect/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/forkeith/syntect/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/forkeith/syntect/git/refs{/sha}","trees_url":"https://api.github.com/repos/forkeith/syntect/git/trees{/sha}","statuses_url":"https://api.github.com/repos/forkeith/syntect/statuses/{sha}","languages_url":"https://api.github.com/repos/forkeith/syntect/languages","stargazers_url":"https://api.github.com/repos/forkeith/syntect/stargazers","contributors_url":"https://api.github.com/repos/forkeith/syntect/contributors","subscribers_url":"https://api.github.com/repos/forkeith/syntect/subscribers","subscription_url":"https://api.github.com/repos/forkeith/syntect/subscription","commits_url":"https://api.github.com/repos/forkeith/syntect/commits{/sha}","git_commits_url":"https://api.github.com/repos/forkeith/syntect/git/commits{/sha}","comments_url":"https://api.github.com/repos/forkeith/syntect/comments{/number}","issue_comment_url":"https://api.github.com/repos/forkeith/syntect/issues/comments{/number}","contents_url":"https://api.github.com/repos/forkeith/syntect/contents/{+path}","compare_url":"https://api.github.com/repos/forkeith/syntect/compare/{base}...{head}","merges_url":"https://api.github.com/repos/forkeith/syntect/merges","archive_url":"https://api.github.com/repos/forkeith/syntect/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/forkeith/syntect/downloads","issues_url":"https://api.github.com/repos/forkeith/syntect/issues{/number}","pulls_url":"https://api.github.com/repos/forkeith/syntect/pulls{/number}","milestones_url":"https://api.github.com/repos/forkeith/syntect/milestones{/number}","notifications_url":"https://api.github.com/repos/forkeith/syntect/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/forkeith/syntect/labels{/name}","releases_url":"https://api.github.com/repos/forkeith/syntect/releases{/id}","deployments_url":"https://api.github.com/repos/forkeith/syntect/deployments","created_at":"2017-03-08T06:46:57Z","updated_at":"2018-10-18T13:48:14Z","pushed_at":"2018-10-29T07:14:57Z","git_url":"git://github.com/forkeith/syntect.git","ssh_url":"git@github.com:forkeith/syntect.git","clone_url":"https://github.com/forkeith/syntect.git","svn_url":"https://github.com/forkeith/syntect","homepage":"http://thume.ca/rustdoc/syntect/syntect/","size":11814,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"trishume:master","ref":"master","sha":"077864d37c80514d1c681c24eec320bd92bcdc8e","user":{"login":"trishume","id":887610,"node_id":"MDQ6VXNlcjg4NzYxMA==","avatar_url":"https://avatars1.githubusercontent.com/u/887610?v=4","gravatar_id":"","url":"https://api.github.com/users/trishume","html_url":"https://github.com/trishume","followers_url":"https://api.github.com/users/trishume/followers","following_url":"https://api.github.com/users/trishume/following{/other_user}","gists_url":"https://api.github.com/users/trishume/gists{/gist_id}","starred_url":"https://api.github.com/users/trishume/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trishume/subscriptions","organizations_url":"https://api.github.com/users/trishume/orgs","repos_url":"https://api.github.com/users/trishume/repos","events_url":"https://api.github.com/users/trishume/events{/privacy}","received_events_url":"https://api.github.com/users/trishume/received_events","type":"User","site_admin":false},"repo":{"id":58836873,"node_id":"MDEwOlJlcG9zaXRvcnk1ODgzNjg3Mw==","name":"syntect","full_name":"trishume/syntect","private":false,"owner":{"login":"trishume","id":887610,"node_id":"MDQ6VXNlcjg4NzYxMA==","avatar_url":"https://avatars1.githubusercontent.com/u/887610?v=4","gravatar_id":"","url":"https://api.github.com/users/trishume","html_url":"https://github.com/trishume","followers_url":"https://api.github.com/users/trishume/followers","following_url":"https://api.github.com/users/trishume/following{/other_user}","gists_url":"https://api.github.com/users/trishume/gists{/gist_id}","starred_url":"https://api.github.com/users/trishume/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trishume/subscriptions","organizations_url":"https://api.github.com/users/trishume/orgs","repos_url":"https://api.github.com/users/trishume/repos","events_url":"https://api.github.com/users/trishume/events{/privacy}","received_events_url":"https://api.github.com/users/trishume/received_events","type":"User","site_admin":false},"html_url":"https://github.com/trishume/syntect","description":"Rust library for syntax highlighting using Sublime Text syntax definitions.","fork":false,"url":"https://api.github.com/repos/trishume/syntect","forks_url":"https://api.github.com/repos/trishume/syntect/forks","keys_url":"https://api.github.com/repos/trishume/syntect/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trishume/syntect/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trishume/syntect/teams","hooks_url":"https://api.github.com/repos/trishume/syntect/hooks","issue_events_url":"https://api.github.com/repos/trishume/syntect/issues/events{/number}","events_url":"https://api.github.com/repos/trishume/syntect/events","assignees_url":"https://api.github.com/repos/trishume/syntect/assignees{/user}","branches_url":"https://api.github.com/repos/trishume/syntect/branches{/branch}","tags_url":"https://api.github.com/repos/trishume/syntect/tags","blobs_url":"https://api.github.com/repos/trishume/syntect/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trishume/syntect/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trishume/syntect/git/refs{/sha}","trees_url":"https://api.github.com/repos/trishume/syntect/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trishume/syntect/statuses/{sha}","languages_url":"https://api.github.com/repos/trishume/syntect/languages","stargazers_url":"https://api.github.com/repos/trishume/syntect/stargazers","contributors_url":"https://api.github.com/repos/trishume/syntect/contributors","subscribers_url":"https://api.github.com/repos/trishume/syntect/subscribers","subscription_url":"https://api.github.com/repos/trishume/syntect/subscription","commits_url":"https://api.github.com/repos/trishume/syntect/commits{/sha}","git_commits_url":"https://api.github.com/repos/trishume/syntect/git/commits{/sha}","comments_url":"https://api.github.com/repos/trishume/syntect/comments{/number}","issue_comment_url":"https://api.github.com/repos/trishume/syntect/issues/comments{/number}","contents_url":"https://api.github.com/repos/trishume/syntect/contents/{+path}","compare_url":"https://api.github.com/repos/trishume/syntect/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trishume/syntect/merges","archive_url":"https://api.github.com/repos/trishume/syntect/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trishume/syntect/downloads","issues_url":"https://api.github.com/repos/trishume/syntect/issues{/number}","pulls_url":"https://api.github.com/repos/trishume/syntect/pulls{/number}","milestones_url":"https://api.github.com/repos/trishume/syntect/milestones{/number}","notifications_url":"https://api.github.com/repos/trishume/syntect/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trishume/syntect/labels{/name}","releases_url":"https://api.github.com/repos/trishume/syntect/releases{/id}","deployments_url":"https://api.github.com/repos/trishume/syntect/deployments","created_at":"2016-05-15T00:37:36Z","updated_at":"2018-10-28T21:31:58Z","pushed_at":"2018-10-30T01:33:20Z","git_url":"git://github.com/trishume/syntect.git","ssh_url":"git@github.com:trishume/syntect.git","clone_url":"https://github.com/trishume/syntect.git","svn_url":"https://github.com/trishume/syntect","homepage":"https://docs.rs/syntect","size":11210,"stargazers_count":464,"watchers_count":464,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":40,"mirror_url":null,"archived":false,"open_issues_count":25,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":40,"open_issues":25,"watchers":464,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/trishume/syntect/pulls/220"},"html":{"href":"https://github.com/trishume/syntect/pull/220"},"issue":{"href":"https://api.github.com/repos/trishume/syntect/issues/220"},"comments":{"href":"https://api.github.com/repos/trishume/syntect/issues/220/comments"},"review_comments":{"href":"https://api.github.com/repos/trishume/syntect/pulls/220/comments"},"review_comment":{"href":"https://api.github.com/repos/trishume/syntect/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/trishume/syntect/pulls/220/commits"},"statuses":{"href":"https://api.github.com/repos/trishume/syntect/statuses/fedcd89495d1a35edf5573b0b60bbceaf854915f"}},"author_association":"COLLABORATOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"trishume","id":887610,"node_id":"MDQ6VXNlcjg4NzYxMA==","avatar_url":"https://avatars1.githubusercontent.com/u/887610?v=4","gravatar_id":"","url":"https://api.github.com/users/trishume","html_url":"https://github.com/trishume","followers_url":"https://api.github.com/users/trishume/followers","following_url":"https://api.github.com/users/trishume/following{/other_user}","gists_url":"https://api.github.com/users/trishume/gists{/gist_id}","starred_url":"https://api.github.com/users/trishume/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trishume/subscriptions","organizations_url":"https://api.github.com/users/trishume/orgs","repos_url":"https://api.github.com/users/trishume/repos","events_url":"https://api.github.com/users/trishume/events{/privacy}","received_events_url":"https://api.github.com/users/trishume/received_events","type":"User","site_admin":false},"comments":4,"review_comments":8,"maintainer_can_modify":false,"commits":8,"additions":167,"deletions":20,"changed_files":2}}
{"actor":{"display_login":"trishume"}}